Repository navigation
Conversation
guialmm
force-pushed
the
fix/compute-case-literal-sampler
branch
from
November 26, 2026 17:44
5559bd8 to
3574ec1
Compare
…clamp on NVIDIA too cs_typed_uint_gather and cs_typed_sint_gather sample a literal S#, which reads the desktop sampler at its StaticSampler slot. ComputeCase bound no samplers, so that slot was empty: WARP clamped the edge lanes and NVIDIA wrapped them, one texel off (from ThatRecompDev#9, diagnosed there by upipibi). ComputeCase now takes Samplers like the pixel cases, and the gathers bind their sampler with PixelMemoryCases.LiteralSampler.
guialmm
force-pushed
the
fix/compute-case-literal-sampler
branch
from
November 26, 2026 18:06
3574ec1 to
2eab112
Compare
Owner
|
this is exactly the fix upipibi described in #9, small and tests only. ran the shader suite here with it, all green on WARP. it'll go in with the translator batch since we tested them together, thanks for picking it up |
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.
On a real GPU,
TypedImageViewWarpTestsfails forcs_typed_uint_gatherandcs_typed_sint_gather(bothdirectvalues): the edge lanes read one texel off, e.g.0xa0000004for0xa0000007. This is the "integer gather off by a texel" item from #9.Why. As @upipibi worked out in #9: the gather samples its literal S#, which reads the desktop sampler at its
StaticSamplerslot, butComputeCasebinds no samplers, so that slot is empty. WARP treats the empty slot as clamp and NVIDIA as wrap, so every lane whose x+1 or y+1 is past the edge reads texel 0.Change. Tests only:
ComputeCasetakesSamplers, like the pixel cases, andComputeCaseRunnerpasses them in its three bindings.PixelMemoryCases.LiteralSampler(nowinternal), for the S# they set (0x92, 0xc00000, 0x4000000, 0).Checked on an RTX 3060 (12 GB, driver 32.0.16.1714), Windows 11, on
mainb1b6655:dotnet build FiveStar.slnx: no warnings.FIVESTAR_TEST_ADAPTER=hardware,TypedImageViewWarpTests: 4 failed before, 28 of 28 pass after.TypedImageViewWarpTests28 of 28; whole shader project 550 passed, 14 skipped, 0 failed;FiveStar.Architecture.Tests31 of 31.AI-assisted (Claude Code, Claude Opus 5.5): wrote the change from the diagnosis in #9 and ran the tests above on my machine.