Repository navigation
fix(recompiler): take point-filtered sampler copies' descriptors from their source sampler - #1402
Merged
Merged
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
9 tasks done
… their source sampler When one guest sampler is paired both with an image that needs point filtering (sint, depth-bits or converted format) and with an ordinary image, ResourceMaterializer::Apply appends a point-filtered copy of the sampler after the original samplers. The resource snapshot only holds the original samplers, so DescriptorBindingBuilder::Populate threw "guest sampler index is out of range" for the copy, both in the sampler binding and in the unnormalized-coordinate check. SamplerResource::copyOf records the sampler a copy was made from, and the guest sampler descriptor of a copy is read from that sampler; the point-filter rewrite of word 2 still applies to the copy. The field is part of the disk cache encoding: cache format version 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mpler copy source Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
Checked the diff, built and ran the full ctest on top of current One fix added as our own commit on your branch:
Note: #1292 touches the same lines in Merging once CI is green on the pushed commit. |
adriadam10
force-pushed
the
claude/sleepy-engelbart-7b6379
branch
from
October 8, 2026 13:02
c521cb8 to
87323a5
Compare
11 tasks done
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a shader uses one guest sampler with an image that needs point filtering (sint, depth-bits, or a converted format without in-shader filtering) and also with an ordinary image,
ResourceMaterializer::Applyadds a point-filtered copy of that sampler after the original samplers. TheResourceSnapshotonly holds the original samplers, soDescriptorBindingBuilder::Populatethrewguest sampler index is out of rangeon the copy. It threw in both the sampler binding andProveUnnormalized, which reads every sampler's descriptor.SamplerResource::copyOfrecords the sampler a copy was made from (NoCopyotherwise).Applysets it on the copy, next toforcePointFiltering.GuestSamplersDescriptortakes theShaderInfoand reads a copy's descriptor from its source sampler. The point-filter rewrite of word 2 still applies to the copy.ImageSampleSharedSampler: a compute shader samples a 32_SINT texture and an 8_8_8_8_UNORM texture through one bilinear sampler, at a coordinate between two texel columns. It checks that the SINT result is the exact point-sampled texel and that the UNORM result is the bilinear blend (0.25), so the copy is point-filtered and the original still filters.copyOf.Tested
Windows 11, MinGW, Release, NVIDIA Vulkan device.
DescriptorBindingBuilder::Populate guest sampler index is out of rangeon unmodifiedmainand passes with this change.agc_driver_*,agc_shader_memory,agc_masked_select,agc_shader_disk_cacheandimage_sample_gathertests pass. This includes every Vulkan sampler execution test (sample reduction, unnormalized, 8_SINT, emulated color compare, gathers, LOD clamp, derivatives).agc_driver_meshwas not built:tests/Mesh.cppdoes not compile under MinGW (setenv,std::aligned_alloc), and this change does not touch it.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code