gpu: compare the sampler descriptor index source on the same tables #1166
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1166
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1166/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ChazY11 on GitHub · 2026-11-24 02:17 UTC · original
ChazY11:tests/sampler-index-control→main· +318 −1 · 5 files · 2 commits · merged 2026-11-24 03:19 UTCWhat
The focused control PR you asked for on #1115. One shader, built twice, that differs only in the source of the
sampler descriptor index:
sampler_index_dispatch_csSV_DispatchThreadID.xsampler_index_group_csSV_GroupID.xEverything else is held identical between the two builds, as you specified: the four descriptor ranges (SRV
t0, UAVu0, two samplers ats1space 0, two comparison samplers ats1space 3), thecs_6_0shader model, the four-wordoutput layout (
word iordinary sampled with descriptori,word i+2comparison) and all three sampler swaps.offscreen_check <warp|hardware> --sampler-index-controlprints, per swap, expected and actual words for eachbuild, then one summary line:
The dispatch-thread build throws on any mismatch, so a broken table or swap still fails the test; the group-id build is
recorded only, because an adapter that folds the index matches on some drivers.
Measured
Windows 11 build 26300.9974, x64, Core Ultra 9 285H; MSVC 14.44.35207, Windows SDK 10.0.26100, DXC 1.8.2502.11,
debug layer enabled,
debug_errors=0 debug_warnings=0in every run.matchesdiffers—0.25 0.25/0 0,0.75 0.75/0 0,0.25 0.25/1 1matchesOn the Arc the two builds differ in the same three swaps, so the index source alone reproduces it: the second group
reads descriptor 0 of both tables even though it reports group id 1.
The translated path keeps its failure
Unchanged, as you asked — no expectation was touched:
Tested
The new operation is covered by the existing CLI self-test (
cli_validation=ok), including its usage error.Notes
Refs #1115. The measurement prose stays in #1133 as you said; this PR adds the fixture and one short paragraphdescribing it, not new claims about the cause.
.hlsl, so the two builds cannot driftapart; no binary DXIL is committed.
@R0Y00 on GitHub · 2026-11-24 02:40 UTC · original
I kept the output slots on SV_DispatchThreadID in both builds and added a fresh sentinel before each dispatch. The selected ID now changes only the sampler indices. On
2721db85, WARP and RTX 4060 Laptop both matched all swaps for both builds under Release (Windows 11 26200.9974, DXC 1.8.2502.11, debug layer on). The missing-write control retained -2 and -4 in the intended slots and failed. Please rerun this exact commit on the Arc 140T when you have a chance so we can isolate the original mismatch.@tedin7 on GitHub · 2026-11-24 02:27 UTC · original · reviewed
Reviewed commit
4b69ea7f405ea57d3bb1b3dd43dc464561bb9fb9on Linux.Code notes:
tests/sampler_index_control.hlslandtests/spirv_window/sampler_index_control.cpp: cleanly isolateSV_DispatchThreadIDvsSV_GroupIDon identical descriptor tables, shader model (cs_6_0), and sampler swaps, trackingoutput_stateacross all six dispatches and asserting only thedispatch_threadcontrol.tests/offscreen_check.cppandCMakeLists.txt: wire--sampler-index-control,DXC_VERSION_STRING, CLI self-test coverage, and CTest targets. Minor formatting nit intests/offscreen_check.cpp:984:kGateSm60SamplerIndexControlandkGateSm60RawUavDumpare missing a newline between them.Linux checks passed:
python3 tests/docs_links_check.py,python3 tests/bidi_controls_check.py,python3 tests/gpu_report_format_check.py,python3 tests/xgameruntime_table_check.py,python3 tests/hardware_reports_check.py.Windows MSVC/DXC build, WARP, and hardware execution rely on CI (currently pending).