Repository navigation
shader: lower pixel structured-to-raw buffer loads - #3100
SimSalabimse wants to merge 7 commits into
Conversation
R0Y00
left a comment
There was a problem hiding this comment.
Independent Debug and Release /O2 each passed 3/3 (ctest --test-dir <build> --no-tests=error -j 1 -V -R '^startup_gfx2hlsl_ps_raw_descriptor', built offscreen_check), on 551708c4 integrated over 300b93f0 (tree 23601ed0692b940e59b6f2515077a0734a34099a). The ordinary address case and the existing bound-drop mutant behaved as expected.
Two added source-built probes expose gaps:
- The generated manifest contains
ud 5andudsrc 4 numrecords 0.load_translationinsrc/startup_stubs/d3d12_draw.inlskips the unrecognized source and sizes the root constants from the four accepted entries. I reproduced that exact omission with the offscreen fixture by callingdraw_once(..., constants[:-1], expected_words()). The draw succeeded through PSO creation with no debug warnings or errors. WARP returned four zeros, and RTX returned3f800000,40800000,41000000,deadbeefinstead of3f800000,40800000,41000000,00000000. Please bind the count or keep the unsupported ordinary draw on an explicit refusal path. A synthetic regression should exercise one of those two outcomes through the manifest loader. - The new range check detects wrap in
a + payloadafterahas already been truncated. In the same fixture, replace the instructionv_mov(0, 0)withstruct.pack('<I', 0x7e0002c4)to makev0=0xfffffffc. At immediate offsets 12, 28 and 32, the generated HLSL wraps the byte address to 8, 24 and 28 before testing it. Both WARP and RTX then read40400000,40e00000,41000000from the wrong portion of the view. Please check overflow when forming the initial byte address and add a guard for this case. The RDNA 2 ISA, §8.1 and Table 35 describes the immediate-plus-VGPR offset and raw bounds check.
Windows 26200.9974, SDK/DXC 10.0.26100.0, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, D3D12 debug layer enabled.
tedin7
left a comment
There was a problem hiding this comment.
Reviewed head 551708c42 (Linux, Python only: no Windows run on my side).
What works:
python3 -B tests/startup_gfx2hlsl_ps_raw_descriptor_check.pypasses at the head: the four controls are refused by name and the CPU model gives3f800000,40800000,41000000,00000000.- Running
raw_descriptor_alu()in the pixel stage is the right fix. The conversion words are tagged the same way as in compute and vertex stages, andraw_conversion_shapes()keeps the clamped and unclamped products apart. - The bound for
buffer_load_dword*matches the raw out-of-range rule for OOB_SELECT 3. The "RDNA 2" ISA guide, 8.1.8 Table 37 and 8.1.5, describes the converted NUM_RECORDS as a byte count.
One more gap, besides the two already reported (the numrecords entry the runtime drops, and the wrap after truncation):
-
tbuffer_load_format_*now gets through unbounded.tbuffer()reachesload_descriptor()throughbuffer_address(), so a pixeltbufferread through the converted descriptor now passes the check and setsraw_load_bound. But onlyop_buffer_load_dwordreads that bound. Source-built case: in your fixtureprogram(conversion()), replace the fourbuffer_load_dwordreads with onetbuffer_load_format_x v1, v0, s[16:19], 0 format:[BUF_FMT_32_FLOAT] offen offset:32. That is the word right pastNUM_RECORDS * stride = 32.- At the parent
db28a796, it is refused:buffer load through a modified descriptor. - At
551708c42, it translates asa = v0 + 32; v1 = r0.Load(a);. There is no bound and nostride/numrecordsentry, so it reads0xdeadbeefwhere the hardware returns 0.
Two ways to fix it. Apply the same bound in
tbuffer()(andload_format()), with one byte count per element. Or keepraw_conversion_ok=Falsefor the MTBUF path, so it stays refused as before. A control for this case in the existing check would lock it in. - At the parent
Commands run:
git fetch origin pull/3100/head
python3 -B tests/startup_gfx2hlsl_ps_raw_descriptor_check.py # at 551708c42: pass
python3 -B probe_tbuffer.py <tree at 551708c42> # translates, unbounded r0.Load(a)
python3 -B probe_tbuffer.py <tree at db28a796 + this PR's check file> # refused: buffer load through a modified descriptor
(probe_tbuffer.py imports your check module and builds the program above: smem_load_x4(DESC, 8) + conversion() + v_mov(0, 0) + <MTBUF word> + s_waitcnt + exp_mrt0(1, 1, 1, 1). The MTBUF word is op 0, FORMAT 22, offen, offset 32, srsrc s[16:19], soffset inline 0.)
AI-assisted; commands listed were executed locally.
rasptum
left a comment
There was a problem hiding this comment.
Review of 551708c4. Comment only.
The translator part is good. It turns the pixel structured-to-raw descriptor conversion into a raw load with a bound. Everything else that touches those words still refuses. I tried 17 bad variants locally (wrong masks, wrong constants, words from a second descriptor, steps out of order) and all of them refused.
Blocking: the draw never fills numrecords. The new stage asks for udsrc N numrecords <srv>. The udsrc parser in d3d12_draw.inl only knows rect, basevertex, startinstance, rootconst, stride, d16unorm16, descword3 and mrtbits. So the entry is never added, and because of the i == tr.uds.size() check, every udsrc after it is dropped too. In a real draw that means either the root signature doesn't match the shader, or the limit reads 0 and every converted load returns zero, with no warning. Fix: fill numrecords from words[2] of the table SRV, the way stride is filled, or refuse unknown udsrc kinds. The --startup-raw-buffer test fills its constants by hand, so it can't catch this.
Should fix:
- test an x2 or x4 load that crosses the limit, stride 0, a non-zero
soffset, and the out-of-place (s_movcopy) form; - add a few of the bad variants above as negative controls, especially the second-descriptor ones;
- "in-place" in the text and in the control name is misleading: the accepted fixture rewrites the registers in place too.
Nits: unaligned addresses lose their low two bits without a refusal. The DW1 swizzle bits, ADD_TID and the DW3 format are kept but never checked; one line in the docs would cover it.
Ran on this head: tests/startup_gfx2hlsl_ps_raw_descriptor_check.py passes, with all 4 controls refusing. tools/run_checks_parallel.py over tests/checks/python-linux passes 235/235. CI is green.
|
Review of Beyond what is already reported here (the dropped
I also checked two things that are not problems in this PR:
AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
I tried to review 327d134c merged over main 4b0350ea. The merge is clean (tree 90ef8851) and git diff --cached --check is clean, but the stand-in does not compile. This matches the Build and test on Windows failure on this head.
Finding: IndirectBufferView initialisers don't match the new field order.
- The struct: it now declares
stride, records, upload, withUINT records = 0;added beforebool upload = false;. - The initialisers: the brace-initialisers in
indirect_table_bufferpass the values in the other order, as{..., stride, true, records},{..., stride, false, records}and{native, offset, bytes, stride, upload, records}. - Result: MSVC rejects all three as narrowing:
. .\tools\dev.ps1; cmake --preset dev; cmake --build --preset dev --target d3d12_xs_shimsrc\startup_stubs/d3d12_draw.inl(2365): error C2397: conversion from 'UINT' to 'bool' requires a narrowing conversion
src\startup_stubs/d3d12_draw.inl(2377): error C2397: conversion from 'UINT' to 'bool' requires a narrowing conversion
src\startup_stubs/d3d12_draw.inl(2407): error C2397: conversion from 'UINT' to 'bool' requires a narrowing conversion
Even with narrowing allowed, records would land in upload and the upload flag in records.
Suggested direction: declare records after upload, so the existing initialisers line up. Or swap the last two values in the three initialisers. The draw path that reads records should then be covered by the numrecords manifest case you added.
Earlier findings. I read 327d134c against the requests on 551708c4. Because the stand-in doesn't build, I couldn't run the Windows fixture, so none of these is confirmed yet:
numrecordsdropped by the loader (R0Y00 1, rasptum):accept_udsrc_linenow acceptsnumrecords, and an unknownudsrcmakesload_translationrefuse the manifest instead of skipping it.- Wrap after truncation (R0Y00 2): the pixel raw path now adds each address term with an overflow check before the range compare.
- MTBUF without the bound (tedin7 3):
tbufferpassesraw_conversion_ok=False, so a typed load through the converted descriptor stays refused.
I'll run the fixture and the 0xfffffffc and MTBUF probes once the stand-in builds.
Verdict: request changes on 327d134c, because the head does not compile.
Environment: Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Windows SDK 10.0.28000.0.
CI: Build and test on Windows fails on 327d134c with the same C2397 errors.
This reply was AI-assisted.
|
Follow-up to the changes-requested review on A second blocker: CI never reaches this step because the build fails first. Possible directions (unconfirmed): skip the driver when The translator fixes run clean. With only the
Still open (non-blocking): Leyukaka's limit. This reply was AI-assisted. |
|
One more blocking item on
Possible directions, none of them tried:
This reply was AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Retested 587a3dec integrated over main 2e12dd8e (tree 8448e705). The merge is clean and git diff --cached --check is clean.
My changes-requested review on 327d134c.
IndirectBufferViewfield order: addressed. All six construction sites now go throughindirect_buffer_view(resource, offset, bytes, stride, records, upload), which assigns by member name. That covers the three inindirect_table_bufferand the alias return that only passed four values. It also covers the two incompute_root_srv_buffer, where{..., 0, true}had been compiling silently withtrueinrecordsanduploadleft false.d3d12_xs_shimbuilds indevandrelease.g++on Windows: addressed. The udsrc cases are nowtests/startup_udsrc_line_check.cpp, built as the CMake targetstartup_udsrc_line_checkand registered asstartup_gfx2hlsl_ps_raw_descriptor_udsrc. The Python check gets the built binary throughX2W_UDSRC_CHECK. A direct run compiles the same source withclon Windows andg++elsewhere.- Earlier translator findings. The wrap check, the MTBUF refusal and the
numrecordsloader fix are covered by the mutants below.
What I traced. In a pixel stage the full conversion now matches either byte_count or byte_count+min1. The load is bounded per dword by a + 4(i+1) <= lim, where lim is the 32-bit product of the view's stride (or max(stride, 1)) and numrecords entry constants. Each address term is added with an unsigned carry check. tbuffer passes raw_conversion_ok=False. On the stand-in side, records is filled from descriptor word 2 in both branches and copied into record_counts[i], and the numrecords udsrc reads it. An unknown udsrc kind or an index gap now makes load_translation refuse the manifest; it used to skip the line.
What I ran. I built d3d12_xs_shim offscreen_check startup_udsrc_line_check in dev and release, then ran
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp|_hardware)?|startup_flat_param_(controls|warp|hardware)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls)$'All 9 pass in Debug and in Release /O2, with no skips. Both startup_gfx2hlsl_ps_raw_descriptor_hardware runs read back 3f800000,40800000,41000000,00000000 for DXC and for FXC. startup_flat_param_hardware reports debug_errors=0 debug_warnings=0 for every case. I also ran the 155 startup_gfx2hlsl_* tests that have no _warp/_hardware suffix, plus startup_flat_param_controls, in dev: 156/156 pass.
Negative control and mutants. Each mutant was run against the tests above. The C++ ones were rebuilt in dev.
| Mutant | Result |
|---|---|
tools/startup/gfx2hlsl.py back to main |
killed: _ps_raw_descriptor, _warp and _hardware fail; _udsrc still passes |
| pixel load ignores the bound | killed (udsrc stride manifest expectation) |
| no carry check on the address terms | killed (bounded-load text and the draw) |
typed tbuffer accepts the conversion |
killed (typed buffer load: translated) |
<= lim → < lim |
killed |
numrecords constant reads strides[] |
killed (source assertion in check_udsrc) |
| udsrc index gap accepted | killed (udsrc driver exit 4) |
stride and records swapped in the desktop-buffer indirect_buffer_view call |
survives |
compute_root_srv_buffer passes records 1, upload false |
survives |
Restored and rebuilt afterwards; the restored build passes again and git diff --quiet is clean.
Non-blocking.
- The stand-in's
recordspath has no runtime test. The draw fixture binds throughoffscreen_check, not the stand-in. On the stand-in side onlycheck_udsrc()'s source assertions cover it, so a wrong argument order at anindirect_buffer_viewcall site still passes. The same holds for thecompute_root_srv_bufferfix, which is a real behaviour change:uploadused to be false on that path. A CPU-side check ofindirect_table_bufferorcompute_root_srv_buffer, or an indirect-draw case throughd3d12_xs_shim, would pin it. - Leyukaka's limit is still open.
run_startup_raw_bufferandcheck_startup_raw_bufferaccept up to 64 entry constants. With the descriptor table that is 65 DWORDs, over the 64-DWORD root-signature limit. The fixture itself uses far fewer. - The description is stale. "Commit under test" is still
551708c4. It also says the stand-in "does not yet publishnumrecords", but this head does.
Verdict: approve on 587a3dec. This supersedes my changes-requested review on 327d134c. R0Y00's changes request on 551708c4 still needs its own sign-off, so I'm not merging.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; SDK 10.0.28000.0 DXC and FXC (the ones CTest picked up); Python 3.12.10; D3D12 debug layer on in startup_flat_param_hardware.
CI: Build and test on Windows passes on 587a3dec; Run platform-independent Python checks on Linux passes too, so the g++ path builds there.
This reply was AI-assisted.
pigalot
left a comment
There was a problem hiding this comment.
Retested 587a3dec integrated over main 2e12dd8e (tree 8448e705). The merge is clean and git diff --cached --check is clean.
My changes-requested review on 327d134c.
IndirectBufferViewfield order: addressed. All six construction sites now go throughindirect_buffer_view(resource, offset, bytes, stride, records, upload), which assigns by member name. That covers the three inindirect_table_bufferand the alias return that only passed four values. It also covers the two incompute_root_srv_buffer, where{..., 0, true}had been compiling silently withtrueinrecordsanduploadleft false.d3d12_xs_shimbuilds indevandrelease.g++on Windows: addressed. The udsrc cases are nowtests/startup_udsrc_line_check.cpp, built as the CMake targetstartup_udsrc_line_checkand registered asstartup_gfx2hlsl_ps_raw_descriptor_udsrc. The Python check gets the built binary throughX2W_UDSRC_CHECK. A direct run compiles the same source withclon Windows andg++elsewhere.- Earlier translator findings. The wrap check, the MTBUF refusal and the
numrecordsloader fix are covered by the mutants below.
What I traced. In a pixel stage the full conversion now matches either byte_count or byte_count+min1. The load is bounded per dword by a + 4(i+1) <= lim, where lim is the 32-bit product of the view's stride (or max(stride, 1)) and numrecords entry constants. Each address term is added with an unsigned carry check. tbuffer passes raw_conversion_ok=False. On the stand-in side, records is filled from descriptor word 2 in both branches and copied into record_counts[i], and the numrecords udsrc reads it. An unknown udsrc kind or an index gap now makes load_translation refuse the manifest; it used to skip the line.
What I ran. I built d3d12_xs_shim offscreen_check startup_udsrc_line_check in dev and release, then ran
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp|_hardware)?|startup_flat_param_(controls|warp|hardware)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls)$'All 9 pass in Debug and in Release /O2, with no skips. Both startup_gfx2hlsl_ps_raw_descriptor_hardware runs read back 3f800000,40800000,41000000,00000000 for DXC and for FXC. startup_flat_param_hardware reports debug_errors=0 debug_warnings=0 for every case. I also ran the 155 startup_gfx2hlsl_* tests that have no _warp/_hardware suffix, plus startup_flat_param_controls, in dev: 156/156 pass.
Negative control and mutants. Each mutant was run against the tests above. The C++ ones were rebuilt in dev.
| Mutant | Result |
|---|---|
tools/startup/gfx2hlsl.py back to main |
killed: _ps_raw_descriptor, _warp and _hardware fail; _udsrc still passes |
| pixel load ignores the bound | killed (udsrc stride manifest expectation) |
| no carry check on the address terms | killed (bounded-load text and the draw) |
typed tbuffer accepts the conversion |
killed (typed buffer load: translated) |
<= lim → < lim |
killed |
numrecords constant reads strides[] |
killed (source assertion in check_udsrc) |
| udsrc index gap accepted | killed (udsrc driver exit 4) |
stride and records swapped in the desktop-buffer indirect_buffer_view call |
survives |
compute_root_srv_buffer passes records 1, upload false |
survives |
Restored and rebuilt afterwards; the restored build passes again and git diff --quiet is clean.
Non-blocking.
- The stand-in's
recordspath has no runtime test. The draw fixture binds throughoffscreen_check, not the stand-in. On the stand-in side onlycheck_udsrc()'s source assertions cover it, so a wrong argument order at anindirect_buffer_viewcall site still passes. The same holds for thecompute_root_srv_bufferfix, which is a real behaviour change:uploadused to be false on that path. A CPU-side check ofindirect_table_bufferorcompute_root_srv_buffer, or an indirect-draw case throughd3d12_xs_shim, would pin it. - Leyukaka's limit is still open.
run_startup_raw_bufferandcheck_startup_raw_bufferaccept up to 64 entry constants. With the descriptor table that is 65 DWORDs, over the 64-DWORD root-signature limit. The fixture itself uses far fewer. - The description is stale. "Commit under test" is still
551708c4. It also says the stand-in "does not yet publishnumrecords", but this head does.
Verdict: approve on 587a3dec. This supersedes my changes-requested review on 327d134c. R0Y00's changes request on 551708c4 still needs its own sign-off, so I'm not merging.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; SDK 10.0.28000.0 DXC and FXC (the ones CTest picked up); Python 3.12.10; D3D12 debug layer on in startup_flat_param_hardware.
CI: Build and test on Windows passes on 587a3dec; Run platform-independent Python checks on Linux passes too, so the g++ path builds there.
This reply was AI-assisted.
pigalot
left a comment
There was a problem hiding this comment.
Correction: the changes-requested review at 23:28 on 587a3dec was posted by mistake. It is a second copy of the 23:23 approval, sent with the wrong state, so please disregard it. The verdict on 587a3dec is approve, as written in the 23:23 review.
A second, independent run over main 9345c21f agrees with that review:
- Tests: the
ps_raw_descriptortests and their neighbours (indirect, root-SRV and compute dispatch) pass in Debug and Release, on WARP and on hardware, with no skips.startup_compute_dispatch_native_*fails with "left ['revision.txt'] in the cache", and it fails the same way onmainfad97f47. - The untested stand-in path (non-blocking 1 in that review): this run confirms it. Swapping
recordsand the upload flag at any of the threeindirect_table_buffercall sites survives every test. A stand-in case whereNUM_RECORDSis not 1 would pin it.
R0Y00's changes request on 551708c4 still needs its own sign-off, so this isn't being merged from here.
This reply was AI-assisted.
|
Thanks for the reviews, all three points are fixed on 327d134. @R0Y00, overflow and numrecords The draw stand-in now keeps a numrecords constant. It reads that count from dword 2 of the table descriptor, and an unknown udsrc line refuses the translation instead of dropping every line after it. The bounded pixel load also checks each address term for overflow before the range compare, so a vgpr of 0xfffffffc plus 12, 28 or 32 stays zero instead of wrapping into the buffer. I ran python3 -B tests/startup_gfx2hlsl_ps_raw_descriptor_check.py. Mutants that drop the overflow check, the numrecords kind, or the record-count store each fail, and the restored check passes. python3 -B tests/startup_tools_lint_check.py tools/startup exited 0. The Linux Python suite from the CI list, python3 -B tools/run_checks_parallel.py --from-dir tests/checks/python-linux plus the listed scripts, passed 246 checks and exited 0. @tedin7, typed buffer load A typed tbuffer load through the converted descriptor is refused again, with the same message as before this change. The control is one float load at offset 32, the first word past the record count times the stride. A mutant that lets that load through fails the check, because the shader translates with no bound. I ran python3 -B tests/startup_gfx2hlsl_ps_raw_descriptor_check.py, python3 -B tests/startup_tools_lint_check.py tools/startup (exit 0), and the Linux Python suite python3 -B tools/run_checks_parallel.py --from-dir tests/checks/python-linux plus the listed scripts (246 checks, exit 0). @rasptum, runtime bound and extra controls The runtime parser knows numrecords now and fills it from dword 2 of the table descriptor, the same place stride comes from. An unknown kind or a gap refuses the manifest, so a later udsrc line is not dropped. The check covers a dwordx2 and a dwordx4 that cross the limit, stride 0, a non-zero soffset, and a conversion that runs on an s_mov copy. The old in-place control is renamed to a word overwritten with zero. Extra refusals cover a wrong stride mask, OOB select 2, a constant scale, steps out of order, and a stride taken from a second descriptor. Unaligned addresses, the swizzle bits, ADD_TID and the format field stay unchecked; that is noted in the experiment writeup. Each of those new checks failed when I took out only its fix, then passed again after restoring it. python3 -B tests/startup_gfx2hlsl_ps_raw_descriptor_check.py passes. python3 -B tests/startup_tools_lint_check.py tools/startup exited 0. The Linux Python suite, python3 -B tools/run_checks_parallel.py --from-dir tests/checks/python-linux plus the listed scripts, passed 246 checks and exited 0. Windows test PC: at 587a3de, the ps_raw_descriptor tests passed twice (4/4, ctest exit 0) and startup_gfx2hlsl_ 389/389 passed, ctest exit 0. AI-Assisted |
pigalot
left a comment
There was a problem hiding this comment.
Retested 130d32cb, your merge of main 7fcde81f, integrated over current main fdb6faaa. The merge is clean (tree d7bf28d8) and git diff --cached --check is clean.
Your merge. git show --remerge-diff 130d32cb shows one conflict, in src/startup_stubs/d3d12_draw.inl, on Translation. It keeps this branch's UdKind enum, whose values are tied to the udsrc_* constants and include num_records, together with main's Srv comment that adds kind 5 (cube) from #2938. That is the right combination. Apart from that hunk, the PR's diff over main is byte-identical to 587a3dec's diff over its own base. So the earlier review of 587a3dec, including the traced behaviour and the mutants, still applies to this code.
What I ran.
-
Builds: full
devandrelease/O2. -
The PR's tests:
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp|_hardware)?|startup_flat_param_(controls|warp|hardware)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls)$'
9/9 pass in Debug and in Release, with no skips.
startup_flat_param_hardwarereportsdebug_errors=0 debug_warnings=0for every case. -
Full suite:
ctest --test-dir out/build/dev --no-tests=error -j 8 -E '(startup_audio|_hardware$)'gives 2002 tests: 1945 pass, 0 fail, 57 capability skips.
Still open (non-blocking, unchanged since 587a3dec).
- The stand-in's
recordspath has no runtime test. A wrong argument order at anindirect_buffer_viewcall site still passes. - Leyukaka's limit is still open. 64 entry constants plus the descriptor table make 65 DWORDs.
- The description is stale. It still names
551708c4as the commit under test.
Verdict: approve on 130d32cb. R0Y00's changes-requested review on 551708c4 still needs R0Y00's own sign-off, so I'm not merging.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; SDK 10.0.28000.0 DXC and FXC (the ones CTest picked up); Python 3.12.10; D3D12 debug layer on in startup_flat_param_hardware.
This reply was AI-assisted.
|
I tested a local reconciliation of Release /O2 passed 6/6 with no skips: the parser, raw descriptor controls, WARP and physical pixel readbacks, and both adjacent Compute input snapshot fixtures. cmake --build --preset release --target d3d12_xs_shim startup_stream_consumer offscreen_check startup_udsrc_line_check
ctest --preset release --no-tests=error --output-on-failure -j 1 -R '^startup_(gfx2hlsl_ps_raw_descriptor|compute_dispatch_input_)'Windows 11 26200.9974, inbox WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The source-built readbacks cover the first word past the converted range and the named refusal controls. Please refresh this source with current main before the hosted checks rerun. |
|
Merged current main (only d3d12_draw.inl conflicted; kept the cube comment and the num_records enumerator) and retested 130d32c on Windows: startup_gfx2hlsl_ps_raw_descriptor 4/4 passed, twice. No startup_udsrc test exists in this tree. AI-Assisted |
|
Thanks for the fixes on Must fix
Should fix Still open: Leyukaka's constant limit is unchanged ( What I ran: This comment was AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Retested 445abdf7 integrated over main ec71c290 (tree 7b6c6606). The trial merge is clean and git diff --cached --check is clean.
What changed since 130d32cb. 445abdf7 is a merge of main 3926a289, and git show --remerge-diff 445abdf7 shows it also carries new work beyond the conflict resolution. I read all of it:
- Conflict in
d3d12_draw.inl(R0Y00 04:16Z, JohnConnorNPC 1): resolved as asked.IndirectBufferViewis nowIndirectBufferViewOf<ID3D12Resource>in the newindirect_buffer_view.h, withstride, records, upload, source. All seven construction sites (five inindirect_table_buffer, two incompute_root_srv_buffer) go through the named constructor with bothrecordsandsource.main's snapshot option is kept; the null return passes source 3 and the snapshot return source 2. No brace-initialised return is left. - Zero bound on title-created views (JohnConnorNPC 2): addressed. Both view-token branches now set the count from
view.Buffer.NumElements(recordsinindirect_table_buffer,record_counts[i]indraw_translated). - Wrap guard never drawn (JohnConnorNPC 3): addressed.
check_drawnow draws thev0 = 0xfffffffcprogram and expects0,0,0,0, with DXC and FXC. - Loader refusal (JohnConnorNPC 4): addressed by a source assertion that the text after
x2w-draw unsupported udsrchasreturn;and nocontinue;. - Stale bound (JohnConnorNPC 5): addressed. A two-descriptor control expects
v2 = r1.Load(a + 0);for the untouched descriptor. - Leyukaka's limit: addressed. Both fixtures now cap the entry constants at 63.
What I ran. Full dev and release /O2 builds, then
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp)?|startup_flat_param_(controls|warp)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls|startup_compute_dispatch_input_warp|startup_slot67_indirect_dispatch_warp|startup_indirect_translated_(draw|indexed|indexed_upload|indexed_alias)_warp)$'
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_gfx2hlsl_ps_raw_descriptor_hardware|startup_flat_param_hardware|startup_compute_dispatch_input_hardware)$'13/13 and 3/3 pass in Debug and in Release, with no skips. On hardware, both compilers read back 3f800000,40800000,41000000,00000000 and "a wrapping address reads four zeros". startup_flat_param_hardware reports debug_errors=0 debug_warnings=0 for every case.
Negative control and mutants. Each was rebuilt in dev and run against the seven ps_raw_descriptor, indirect_translated, slot67_indirect_dispatch and compute_dispatch_input tests (WARP). The unmodified tree passes 7/7.
| Mutant | Result |
|---|---|
tools/startup/gfx2hlsl.py back to main |
killed: _ps_raw_descriptor and _warp fail |
drop self.raw_load_bound = None |
killed (two-descriptor control) |
| no carry check on the address terms | killed (bounded-load text) |
unsupported udsrc: return; → continue; |
killed (source assertion) |
constructor drops source |
killed (udsrc driver exit 9; startup_compute_dispatch_input_warp also fails) |
constructor puts stride in records |
killed (udsrc driver exit 10) |
| stride and records swapped at the desktop-buffer return | killed (source assertion, and startup_indirect_translated_draw_warp fails at run time) |
| snapshot return reports source 0 | killed (source assertion, and startup_compute_dispatch_input_warp) |
records = 0; added after records = view.Buffer.NumElements; |
survives |
record_counts[i] = 0; added after record_counts[i] = view.Buffer.NumElements; |
survives |
record_counts[i] = view.stride; added after record_counts[i] = view.records; |
survives |
offscreen_check accepts 64 constants again |
survives |
No equivalent mutants. The files were restored afterwards and git diff --quiet is clean.
Non-blocking.
- The record count the stand-in publishes is pinned by text only. The three surviving count mutants keep the asserted source lines and change the value, and no test notices. This is the same gap as non-blocking 1 in my review of
587a3dec, now narrower: the constructor and the argument order are covered, the value that reachesud<numrecords>in a stand-in draw is not. A stand-in draw through a converted descriptor withNUM_RECORDSother than the stride would pin it. - A raw title-created view gets a count in elements, not bytes (read from the code, not run). For a raw view, both token branches use
stride 0andbytes = NumElements * 4, and nowrecords = NumElements. The table-descriptor branch treats stride 0 as one byte per record (bytes = (stride ? stride : 1) * words[2]). With the clamped conversion the shader's limit ismax(0, 1) * NumElements, a quarter of the view, so loads from the upper three quarters would read 0. With the plain conversion the limit is 0. Suggested direction, unconfirmed: publishbytesas the count when the view is raw, or refuse anumrecordsconstant on a raw token view. - The 63-constant cap has no test. A 64-constant control in either fixture would pin it.
- The description is stale. It names
551708c4as the commit under test and says the stand-in "does not yet publishnumrecords". The fixes for the latest review are inside a commit titled as a merge ofmain; a line in the description listing them would help the next reader.
Verdict: approve on 445abdf7. The findings from my earlier reviews and the ones from R0Y00's 04:16Z comment and JohnConnorNPC's 07:34Z comment are addressed at this head as listed above. R0Y00's changes-requested review on 551708c4 is still recorded and needs R0Y00's own sign-off, so I am not merging this.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; D3D12 debug layer on for the hardware runs (X2W_TEST_DEBUG_LAYER=1).
CI: Build and test on Windows passes on 445abdf7.
This reply was AI-assisted.
|
The five review items are fixed on
Windows test PC (NVIDIA 32-lane), head ctest --preset dev --no-tests=error -j 1 -R '^startup_gfx2hlsl_ps_raw_descriptor' -E 'startup_audio_output|startup_audio_pacing|startup_audio_provider'
ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_dispatch_input_' -E 'startup_audio_output|startup_audio_pacing|startup_audio_provider'
ctest --preset dev --no-tests=error -j 1 -R startup_gfx2hlsl_ -E 'startup_audio_output|startup_audio_pacing|startup_audio_provider'
AI-Assisted |
445abdf to
49a1590
Compare
|
Retested the rebased head
The only conflict with main was in AI-Assisted |
pigalot
left a comment
There was a problem hiding this comment.
Retested c0d43994 integrated over main 212d4b5f (tree c576752c). The trial merge is clean and git diff --cached --check is clean.
What changed since my approval on 445abdf7. The branch was rebased onto main 0614f68c, so I compared the PR's own diff at both heads (git diff <base>...<head> over the 13 files). Two lines differ, and nothing else:
src/startup_stubs/d3d12_compute_dispatch.inl: the scalar-window snapshot thatmainadded since then,view = {chunk, start, bytes, stride, true, 2};, is nowview = indirect_buffer_view(chunk, start, bytes, stride, words[2], true, 2);. With the PR's extrarecordsmember the brace form puttrueinrecordsand2inupload(the C2397 the author reports on49a1590e). The named call keepsupload = trueandsource = 2as onmain.tests/startup_gfx2hlsl_ps_raw_descriptor_check.py: one assertion for that exact line.
I also looked for any other positional initialisation of the view in the merged tree. There is none: the eight construction sites all go through indirect_buffer_view, and native_mesh57.inl only reads members by name.
The items from my earlier reviews, R0Y00's 04:16Z comment and JohnConnorNPC's 07:34Z comment are unchanged from 445abdf7, where I checked them one by one; the controls for them still kill their mutants below.
What I ran. Full dev and release /O2 builds, then
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp)?|startup_flat_param_(controls|warp)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls|startup_compute_dispatch_input_warp|startup_compute_dispatch_native_warp|startup_slot67_indirect_dispatch_warp|startup_indirect_translated_(draw|indexed|indexed_upload|indexed_alias)_warp)$'
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_gfx2hlsl_ps_raw_descriptor_hardware|startup_flat_param_hardware|startup_compute_dispatch_input_hardware|startup_compute_dispatch_native_hardware)$'- CPU and WARP: 13 passed and 1 capability skip in Debug and in Release. The skip is
startup_compute_dispatch_native_warp(77), so the scalar-window case ran on hardware only. - Hardware: 4/4 in Debug and in Release, no skips. Both compilers read back
3f800000,40800000,41000000,00000000and "a wrapping address reads four zeros";startup_flat_param_hardwarereportsdebug_errors=0 debug_warnings=0for every case.
A first Release hardware attempt failed startup_gfx2hlsl_ps_raw_descriptor_hardware because my own mutation run was editing the sources that check reads at the time. With the tree untouched it passes; the 4/4 above is that rerun.
Title run. prwatch's real-title run of this head merged onto the baseline commit: pass (job 12).
Negative control and mutants. Each was rebuilt in dev and run against startup_gfx2hlsl_ps_raw_descriptor, _udsrc, _warp, startup_compute_dispatch_input_warp and startup_compute_dispatch_native_warp (the last one skips, as above). The unmodified tree passes.
| Mutant | Result |
|---|---|
tools/startup/gfx2hlsl.py back to main |
killed: _ps_raw_descriptor and _warp fail |
scalar-window snapshot: source 2 → 0 |
killed (new source assertion) |
scalar-window snapshot: upload true → false |
killed (new source assertion) |
scalar-window snapshot: stride and records swapped |
killed (new source assertion) |
scalar-window snapshot: records words[2] → 0 |
killed (new source assertion); equivalent at run time, see note 1 |
unsupported udsrc: return; → continue; |
killed (source assertion) |
drop self.raw_load_bound = None |
killed (two-descriptor control) |
constructor drops source |
killed (_udsrc, and startup_compute_dispatch_input_warp fails) |
constructor drops records |
killed (_udsrc) |
records = 0; added after records = view.Buffer.NumElements; |
survives (same as on 445abdf7) |
10 run: 9 killed, 1 survives. One of the killed ones is equivalent at run time and is caught by text only. The files were restored afterwards and git diff --quiet is clean.
Non-blocking.
- The scalar-window line is pinned by text only. I rebuilt the first three scalar-window mutants and ran
startup_compute_dispatch_native_hardwareandstartup_compute_dispatch_input_hardwareon the RTX 5090: all three still pass 2/2. So only the new source assertion tells them apart. This gap is inmain's own scalar-window fixture, not something this PR introduced. Therecordsargument at this site is not read by the compute path (views[i]copiesresource,offset,bytes,uploadandstrideonly), sowords[2]there has no effect today. - The record count the stand-in publishes for a title-created view is still unpinned (the surviving mutant). Same as non-blocking 1 in my review of
445abdf7. - A raw title-created view gets a count in elements, not bytes. Unchanged from non-blocking 2 on
445abdf7(read from the code, not run). - The description is still stale. It names
551708c4as the commit under test and says the stand-in "does not yet publishnumrecords".
Verdict: approve on c0d43994. The rebase kept the reviewed change intact and the one new construction site is correct. R0Y00's changes-requested review on 551708c4 is still recorded; its two points (the dropped numrecords entry and the wrap after truncation) are addressed at this head, but that review needs R0Y00's own sign-off, so I am not merging this.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; D3D12 debug layer on for the hardware runs (X2W_TEST_DEBUG_LAYER=1).
CI: Build and test on Windows passes on c0d43994.
This reply was AI-assisted.
Leyukaka
left a comment
There was a problem hiding this comment.
Head c0d43994, read against main 20bd1553 (git merge-tree clean, tree ce8c6bf4). Diff and source reading only, nothing built or run.
One construction site is still positional: src/startup_stubs/native_mesh57.inl:23, view = {range.resource, range.offset, range.bytes, 0, true};. view is an element of std::array<IndirectBufferView,32> (:14, :18). The line is the same on main, at this head and in the merged tree.
- On main the members are
resource, offset, bytes, stride, upload, source, sotrueisupload. - With
IndirectBufferViewOf(stride, records, upload, source),truegoes torecordsanduploadstays false.booltounsignedis not a narrowing conversion, so this compiles.
Effect, from reading the code: native_mesh57.inl:205 at this head does if (!views[i].upload) require_state(self, views[i].resource, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);. The range at :22 comes from list_upload_range, whose pages are committed on an upload heap in GENERIC_READ (list_upload_pages.h). For a resource it does not track, require_state issues a COMMON to NON_PIXEL_SHADER_RESOURCE transition. On main the flag is true and no barrier is issued. The file is included outside any #ifdef (d3d12_xs_device.cpp:7077 at this head).
Fix: view = indirect_buffer_view(range.resource, range.offset, range.bytes, 0u, 0u, true, 0);.
check_udsrc() asserts construction lines in d3d12_draw.inl and d3d12_compute_dispatch.inl only, so it does not see this file. An assertion for the line above would cover it.
The approval on c0d43994 says native_mesh57.inl only reads members by name; line 23 is the exception. A git grep over src/startup_stubs in the merged tree for brace initializers ending in a bool finds no other one of this type (the two in d3d12_compute_dispatch.inl are the local struct View).
Track the structured-to-raw descriptor conversion in a pixel stage and lower a non-indexed buffer load as a raw byte-address read bounded by the converted byte count. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
A pixel load through the structured-to-raw conversion adds each address term with an overflow check before the range compare. A typed buffer load through that descriptor stays refused. The draw stand-in stores numrecords from dword 2 of the table descriptor and refuses an unknown udsrc line. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Brace initialization put the upload flag in records and narrowed the record count into the bool. The view is filled by member name, including the compute root returns. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
The parser cases live in a small C++ target the Windows build compiles with MSVC. The Python check runs that binary, and compiles the same source with cl or g++ when CTest has not handed it one. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Created buffer views publish their element count, and every indirect buffer view is still built by the named constructor so records and the snapshot source stay in their own fields. The raw-buffer fixture leaves one root dword for its descriptor table. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
The brace list put the snapshot source into the upload flag, which narrows an int into a bool. The record count stays in its own field. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
c0d4399 to
185b7de
Compare
|
Fixed at Windows test PC (MSVC,
AI-Assisted |
Leyukaka
left a comment
There was a problem hiding this comment.
Head 185b7dec, rebased onto main 77d1ba4d. Diff and source reading only, nothing built or run. This replaces my review of c0d43994.
git range-diff against c0d43994: the six earlier commits are unchanged apart from rebase context in one of them. 185b7dec is new (2 files, +4/-1).
Fixed: src/startup_stubs/native_mesh57.inl:23 is now view = indirect_buffer_view(range.resource, range.offset, range.bytes, 0u, 0u, true, 0);. With the signature in indirect_buffer_view.h:21 (stride, records, upload, source), upload is true and records is 0, as on main, so the if (!views[i].upload) require_state(...) loop issues no transition for the upload range.
check_udsrc() now asserts that line and the absence of view = {range.resource (tests/startup_gfx2hlsl_ps_raw_descriptor_check.py:422-424). Restoring the old line fails both. This is a source-text assertion; no test I read checks the flag at run time.
No other brace initializer of IndirectBufferView remains under src/startup_stubs; the ones in d3d12_compute_dispatch.inl (:651, :839, :884, :926) are the local struct View (:587).
Not run by PR CI: startup_gfx2hlsl_ps_raw_descriptor_(udsrc|warp|hardware) and native_fixed_mesh57_buffers_(warp|hardware) are not in the pr test filter. The Linux job runs the Python script with the assertion above. The device tests rest on your 6/6 on 185b7dec.
git merge-tree --write-tree onto origin/main 77d1ba4d: clean.
|
Review of SHOULD
CI on this head: Windows, fixtures and Linux Python pass. I didn't build or run the device tests. AI-assisted. |
pigalot
left a comment
There was a problem hiding this comment.
Retested 185b7dec integrated over main 77d1ba4d (tree a9cdca5f), the commit it is rebased onto. That trial merge is clean and git diff --cached --check is clean.
This head now conflicts with main. While I was testing, main moved to 4b0586d4 (#3398 and #3400). git merge-tree reports one conflict, in src/startup_stubs/d3d12_draw.inl: main added #include "startup_stubs/input_view_token.h" and four static_assert lines at the place where this PR adds its two includes (udsrc_line.h, indirect_buffer_view.h). Both sides are needed. CMakeLists.txt and d3d12_compute_dispatch.inl merge automatically. Everything below was measured over 77d1ba4d, not over 4b0586d4; I have not built the resolved merge. main's new commits add no new IndirectBufferView construction site (git diff 77d1ba4d origin/main -- src/startup_stubs/).
A correction to my review of c0d43994. There I wrote that native_mesh57.inl "only reads members by name" and that every construction site went through indirect_buffer_view. That was wrong: line 23 was still view = {range.resource, range.offset, range.bytes, 0, true};, which with the new records member put true in records and left upload false. Leyukaka found it; my approval of c0d43994 should not have been given with that line in place.
What changed since c0d43994. git range-diff over the two bases: the six earlier commits are the same apart from rebase context in one hunk of d3d12_draw.inl. 185b7dec is new, two files:
native_mesh57.inl:23is nowview = indirect_buffer_view(range.resource, range.offset, range.bytes, 0u, 0u, true, 0);. Against the signature inindirect_buffer_view.h(stride, records, upload, source) that givesupload = true,records = 0,source = 0, which is whatmainhas. The loop at:202(if (!views[i].upload) require_state(...)) therefore skips the upload range again.check_udsrc()asserts that line and thatview = {range.resourceis gone.
I searched the merged tree again for brace initialisation of the view type, this time by pattern over all three files that use it (view = {, typed = {, views[...] = {, return {, IndirectBufferView{...}). The nine construction sites all call indirect_buffer_view. The remaining brace assignments are other types: the local struct View in d3d12_compute_dispatch.inl and the index-buffer view at d3d12_draw.inl:3706.
What I ran. Full dev and release /O2 builds over 77d1ba4d, then
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_gfx2hlsl_ps_raw_descriptor(_udsrc|_warp)?|startup_flat_param_(controls|warp)|startup_gfx2hlsl_buffer_store|startup_gfx2hlsl_load_desc_controls|startup_compute_dispatch_input_warp|startup_compute_dispatch_native_warp|startup_slot67_indirect_dispatch_warp|startup_indirect_translated_(draw|indexed|indexed_upload|indexed_alias)_warp|native_fixed_mesh57_buffers_warp)$'
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_gfx2hlsl_ps_raw_descriptor_hardware|startup_flat_param_hardware|startup_compute_dispatch_input_hardware|startup_compute_dispatch_native_hardware|native_fixed_mesh57_buffers_hardware)$'- CPU and WARP: 14 passed and 1 capability skip in Debug and in Release. The skip is
startup_compute_dispatch_native_warp(77). - Hardware: 5/5 in Debug and in Release, no skips. Both compilers read back
3f800000,40800000,41000000,00000000and "a wrapping address reads four zeros";startup_flat_param_hardwarereportsdebug_errors=0 debug_warnings=0for every case.
Title run. prwatch's real-title run of this head: pass (job 35).
Negative control and mutants. Each was rebuilt in dev and run against startup_gfx2hlsl_ps_raw_descriptor, _udsrc, _warp, native_fixed_mesh57_buffers_warp and startup_compute_dispatch_input_warp. The Mesh57 mutants and "constructor drops upload" were also run against native_fixed_mesh57_buffers_hardware with the debug layer on. The unmodified tree passes all of them.
| Mutant | Result |
|---|---|
tools/startup/gfx2hlsl.py back to main |
killed: _ps_raw_descriptor and _warp fail ("through a modified descriptor") |
| Mesh57: old positional brace restored | killed by the new source assertion only; both Mesh57 device tests pass |
Mesh57: upload true → false |
killed by the new source assertion only; both Mesh57 device tests pass |
Mesh57: records 0u → 1u |
killed by the new source assertion; equivalent at run time (nothing in native_mesh57.inl reads records) |
scalar-window snapshot: source 2 → 0 |
killed (source assertion) |
constructor drops records |
killed (_udsrc and the source assertion) |
constructor drops upload |
killed (_udsrc and the source assertion); native_fixed_mesh57_buffers_hardware passes |
records = 0; added after records = view.Buffer.NumElements; |
survives (same as on 445abdf7 and c0d43994) |
8 run: 7 killed, 1 survives. One of the killed ones is equivalent at run time. The files were restored afterwards and git diff --quiet is clean.
Non-blocking.
- The Mesh57 upload flag is pinned by text only. With
uploadfalse on that line,native_fixed_mesh57_buffers_warpandnative_fixed_mesh57_buffers_hardware(RTX 5090, debug layer on) still pass. So the device tests would not have caught the regression atc0d43994, and would not catch it coming back in a different spelling. I did not check whether the fixture's root SRV address is inside an upload range at all; if it is not, the changed line is never reached by a test. That gap is inmain's Mesh57 fixture, not introduced here. - The record count the stand-in publishes for a title-created view is still unpinned (the surviving mutant). Unchanged from my earlier reviews.
- The description is still stale. It names
551708c4as the commit under test and says the stand-in "does not yet publishnumrecords".
Verdict: comment, not an approval, because the head no longer merges into main. Over 77d1ba4d I found nothing blocking: the Mesh57 site is fixed and the rest is unchanged from what I tested before. Please merge main 4b0586d4 (keep both include blocks in d3d12_draw.inl); I will retest that head. R0Y00's changes-requested review on 551708c4 is still recorded; its two points (the dropped numrecords entry and the wrap after truncation) are addressed at this head. I am not merging this.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; D3D12 debug layer on for the hardware runs (X2W_TEST_DEBUG_LAYER=1).
CI: Build and test on Windows passes on 185b7dec.
This reply was AI-assisted.
|
Taking this over since there has been no activity for 48 h; will hand back if you resume. Your commits stay as they are and keep your authorship; I will rebase onto current |
Change
Since #2910, a non-indexed MUBUF load in a pixel stage through the standard structured-to-raw descriptor conversion is refused as
buffer load through a modified descriptor.load_descriptor()already accepts that shape, butraw_descriptor_alu()only ran for compute and vertex stages.This change:
raw_descriptor_alu()in a pixel stage as well, so the four conversion words are tracked the same way as for compute and vertex stages.NUM_RECORDS * stride(NUM_RECORDS * max(stride, 1)when the stride extract was clamped). A wrapped address reads as zero.byte_count+min1tag when that extract was clamped. Stores already accepted either product; they now match both tags explicitly.idxenloads refused under their current messages.A stride-only clear still lowers as an unbounded raw load, as in compute and vertex stages. Compute and vertex load emission is unchanged.
The graphics stand-in fills
strideand does not yet publishnumrecords, so a completed title pipeline still needs that constant before a draw applies the bound. The offscreen fixture supplies both.Verification
Commit under test:
185b7decd0e0cb0bf359990c6a5dc6ead9e03dc7, rebased onto upstream main77d1ba4d63ba31abaf4ca3635d4159189a423201.A source-built pixel fixture converts a table descriptor and reads it with
buffer_load_dword ... offenat four offsets, including one word pastNUM_RECORDS * stride. Negative controls, each refused by name: byte count missing, OOB step missing, in-place word rewrite, and anidxenload. A clamped extract usesmax(stride, 1) * NUM_RECORDS. A draw readback is compared with a CPU model of the same product. Dropping the bound must read the word past the limit.The Mesh57 upload-range path constructs its indirect buffer view with
indirect_buffer_view(range.resource, range.offset, range.bytes, 0u, 0u, true, 0), so the upload flag cannot shift intorecords. The pixel fixture asserts that construction.Windows test PC (MSVC,
--preset dev,-j 1), at185b7dec:6/6 passed, ctest exit 0:
native_fixed_mesh57_buffers_warp,native_fixed_mesh57_buffers_hardware,startup_gfx2hlsl_ps_raw_descriptor_udsrc,startup_gfx2hlsl_ps_raw_descriptor,startup_gfx2hlsl_ps_raw_descriptor_warp,startup_gfx2hlsl_ps_raw_descriptor_hardware. Build exit 0.Earlier on
c0d43994, the same worktree ranstartup_gfx2hlsl_ps_raw_descriptorandstartup_compute_dispatch_input_(6/6, exit 0). On an earlier head the fullstartup_gfx2hlsl_list was 379/379, exit 0.The fixtures are hand-assembled gfx1013 words. No game files or captured programs.
Checklist
Fixes #3064
AI-assisted (Cursor)