gpu: compare the sampler descriptor index source on the same tables #1159
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1166"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T02:17:23Z.
What
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.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:27:05Z.
Review: COMMENTED
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).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T02:40:10Z.
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.