startup: bind pixel-stage UAVs from the title's descriptor table #2440

Merged
roansystemlabs merged 3 commits from upstream-pr/2448 into main 2026-11-26 02:37:11 +00:00
roansystemlabs commented 2026-11-25 17:01:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T17:01:11Z.


Refs #1996 (item F). Follow-up of #2155; also the "Pixel-stage UAV binding" line of #2274.

Change

The runtime now binds the image a translated pixel program stores to. Before this, load_translation dropped every translation with a uav line: first with "pixel-stage UAVs are not bound yet", and since #2059 by refusing every x2w-manifest 2 manifest and every uav line.

  • load_translation reads uav N tex2d table P O, the line tools/startup/gfx2hlsl.py writes for a pixel-stage image_store. Only that form is read: a view qualifier (float, uint, sint) or a channels field, as in the compute line on main (uav N tex2d float table P O channels 4), is refused.
  • Version 2 manifests (the ones gfx2hlsl writes when a program stores) are read again. #2059's guard is kept in another form: every uav line is either bound or refused by name, so the vertex-stage buffer line (uav N raw table P O) still keeps its translation from being used and no store is skipped silently. Other manifest versions stay refused. The offline vertex-store note in docs/experiments.md now says this instead of "refuses version 2 manifests".
  • The translated root signature gets a UAV range u0.. after the SRVs in its view table (create_translated_root and sampler_root_parameter in translated_sampler_bindings.h, both already on main, take the view count).
  • At draw time the view is made from the unordered-access view the title created at that table entry (view token, slot 19 record), on mip 0 of a 2D texture, and the texture is moved to UNORDERED_ACCESS for the draw.
  • As asked on #1996, the binding is self-contained in d3d12_draw.inl (read_pixel_uav_line, pixel_uav_view, resolve_pixel_uavs); no new shared header. Pass keeps the last accepted render and depth targets (bound_targets, bound_depth) so the draw can compare them; the existing trace_targets are filled only while the red-producer diagnostic is on.

Refused by name, with nothing bound in place of the view:

  • when the manifest is loaded (the translation is not used): another image kind, a buffer line (uav N raw table P O, the vertex-stage store of #2059, or the older uav N table P O), a view qualifier, another source, an extra field such as channels, a view index out of order, more than eight views;
  • at draw time (the draw is not translated): no table at the parameter, an entry outside the bound table, an entry without a view, an entry that is not an unordered-access view, a resource without ALLOW_UNORDERED_ACCESS, an array, 3D, 1D or multisampled resource, a view of another dimension, mip or plane, an integer, sRGB or non-colour format, a format without typed UAV store on the device, and a texture that is also an SRV, a render target or the depth texture of the same draw. These checks run before any view of the draw is written or any texture changes state.
  • Indirect draws (slot 61) refuse a translation with a uav line, counted in the #2333 census as unsupported_resource_or_entry.

Out of scope: compute UAVs (#2274 B) and barriers between draws that write and read the same texture.

Verification

Commit 1247a2895 on fbe249f68 (rebased; the previous head was e1d5a997b on b442b57fb). git merge-tree with today's main (f02ebd669) is clean. Windows 11 (10.0.26200), MSVC 14.44, NVIDIA GeForce RTX 3070 driver 32.0.16.2101, and WARP 10.0.26100.9818, debug layer on.

cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^startup_pixel_uav_' -V
ctest --preset dev --no-tests=error -R '^startup_'
  • startup_pixel_uav_warp and startup_pixel_uav_hardware passed (2/2) in each of two runs on 1247a2895: 21 cases and the exec guard control on each adapter, debug layer on with 0 errors in every case (42 of 42 per run); a.buffer-line is refused by name on both adapters. The previous head e1d5a997b passed the same way, and @Makto94 ran it on an RTX 3070 Ti.
  • Neighbouring runtime, stream and draw tests on 1247a2895, ctest --preset dev --no-tests=error -R "^startup_(stream_|draw|pixel_|indirect|sampler|image_|formatted|clear_uav|list_uav|gfx2hlsl_buffer_store|d16_srv|frame_copy|mrt|joined|root_|view_|memory_srv|mubuf)": 214 tests, 0 failed, 1 skipped with its existing capability reason (startup_view_heap_warp), 623 s. This includes startup_joined_table_pointer_* (#2507, whose X2W_TEST_JOINED_TABLE flag met ours in startup_stream_consumer.cpp), formatted buffers and views, indirect draws, ClearUAV, UAV barriers and startup_gfx2hlsl_buffer_store (#2059).
  • The whole ^startup_ suite on the first rebase of this change (294178042, on 8ecaa8ec9, same code): 897 tests, 0 failed, 9 skipped with their existing capability reasons, 2057 s. It was not repeated on 1247a2895, whose base adds 16 commits; those that touch the same files (#2002 vertex fetch without elements, #1974/#1975 compute slots, #2648 slot 76) do not touch the translated root signature, the view table or the UAV binding, and the subset above covers the draw path.
  • Release preset: not run.

What the 21 cases check (tests/startup_pixel_uav_check.py, each case its own process):

  • Drawn: the table names texture A (an explicit 2D view) or texture B (a view created without a description). Texel (1, 2) of mip 0 of that texture holds 1.0, 2.0, 3.0, 4.0. Every other word of the four textures, both mips (320 words), keeps its sentinel.
  • Refused, each with its logged reason and every word unchanged: table entry without a view, an SRV entry, a texture without ALLOW_UNORDERED_ACCESS, a R32G32B32A32_UINT view, a view of mip 1, a one-slice 2D-array view, an entry outside the bound table, no table, the texture also bound as an SRV, the texture also bound as the draw's render target (a fifth texture with both flags, bound through list slot 50), and seven other manifest lines (including the compute form with float and channels 4).
  • Exec: the two v_cmpx variants from #2155 through the runtime. Exec on writes the texel; exec off leaves it.

Negative controls:

  • Exec guard (in the test): the exec-off shader recompiled with the guard removed from the store must write the texel, and the check reports texel_mismatch texture A mip 0 texel (1, 2) word 0: got 3f800000, expected c0000024 on both adapters.
  • Mutants of the runtime, rebuilt and run locally on both adapters, not part of the PR:
    • swapped table entry (the view read 32 bytes further on): cases a and b fail with the texel still at its sentinel;
    • ALLOW_UNORDERED_ACCESS check removed: no-ua fails, the debug layer reports IDs 340 and 524 and the device is removed (0x887a0001);
    • mip 1 bound instead of mip 0: cases a and b fail (the store at (1, 2) falls outside the 2x2 mip and mip 0 keeps its sentinel);
    • render/depth target check removed: target fails, the debug layer reports ID 538 (the render target is in UNORDERED_ACCESS at the draw).
    • The four mutants and the fail-first run were made on an earlier base. Since then the change differs only in the indirect refusal line (the #2333 census code); the rebase onto b442b57fb added the manifest-version and raw line handling described above (covered by the a.buffer-line case), and the rebase onto fbe249f68 changed only conflict context (docs wording from the compute image store, and the environment-variable list in startup_stream_consumer.cpp).
  • Fail-first on main: the same test fails on every case (including target), and the log shows stores to an image (uav 0 tex2d table 0 0); pixel-stage UAVs are not bound yet, translation not used.
  • Without the debug layer (X2W_PIXEL_UAV_NO_DEBUG=1, as on a machine without it) the cases still run and report debug layer: absent; the zero-error requirement applies only when the layer is on.

Evidence and follow-up

  • The pixel program is the hand-assembled one from #2155 (tests/startup_pixel_image_store_check.py, no bytes from any retail software). I assembled its source and the two v_cmpx variants with clang 15.0.7 (--target=amdgcn-amd-amdhsa -mcpu=gfx1013) and extracted .text with llvm-objcopy 15: all three match the recorded words (64, 68 and 68 bytes). That is the reassembly #2155 could not run; it is not part of the CI test.
  • tests/startup_pixel_uav.cpp (a startup_stream_consumer mode) creates the textures through device slot 127, the views through slots 18, 19 and 20 and the table through list slot 36, so the draw goes through the same path as a title.
  • The title's descriptor stride differs by adapter (64 bytes on WARP, 32 on the RTX 3070); the test does not depend on it.
  • Stage of the store: the graphics manifest does not name the stage of a uav line. On main op_image_store accepts only pixel and compute stages, and compute writes its own manifest (stage cs, uav N tex2d float … channels 4, not read by load_translation), so in a graphics manifest only the pixel stage writes a tex2d line; a vertex-stage store is always a raw line (op_buffer_store_vs), which is refused here. The view table is visible to all stages, so the binding does not depend on the stage either. If a later change lets another graphics stage store to an image, the manifest should carry the stage.
  • Retired textures (#2468): the bound texture is not retire_hold-ed like a sampled one, because retire_classify already keeps every resource with ALLOW_UNORDERED_ACCESS (which this binding requires) out of the retire class.
  • Overlap: #2059 (merged) refused every version 2 manifest so that its offline vertex buffer stores never run. This change reads version 2 for the pixel tex2d line and refuses its uav N raw table P O line by name, so those stores still never run; the a.buffer-line case checks that refusal on both adapters. The draft #2603 binds the same pixel uav line in d3d12_draw.inl in another layout; the overlap is described in a comment on this PR.
  • Not tested: AMD and Intel GPUs, console hardware, a title's own resources (whether they carry ALLOW_UNORDERED_ACCESS decides how often this binds), indirect draws with a uav line (refused, no fixture), resources the runtime creates by title address (refused by name, no fixture), and a UAV of the bound depth texture (refused by name with the render-target check, no fixture).

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6609524980 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2448). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T17:01:11Z. --- Refs #1996 (item F). Follow-up of #2155; also the "Pixel-stage UAV binding" line of #2274. ## Change The runtime now binds the image a translated pixel program stores to. Before this, `load_translation` dropped every translation with a `uav` line: first with "pixel-stage UAVs are not bound yet", and since #2059 by refusing every `x2w-manifest 2` manifest and every `uav` line. - `load_translation` reads `uav N tex2d table P O`, the line `tools/startup/gfx2hlsl.py` writes for a pixel-stage `image_store`. Only that form is read: a view qualifier (`float`, `uint`, `sint`) or a `channels` field, as in the compute line on main (`uav N tex2d float table P O channels 4`), is refused. - Version 2 manifests (the ones gfx2hlsl writes when a program stores) are read again. #2059's guard is kept in another form: every `uav` line is either bound or refused by name, so the vertex-stage buffer line (`uav N raw table P O`) still keeps its translation from being used and no store is skipped silently. Other manifest versions stay refused. The offline vertex-store note in `docs/experiments.md` now says this instead of "refuses version 2 manifests". - The translated root signature gets a UAV range `u0..` after the SRVs in its view table (`create_translated_root` and `sampler_root_parameter` in `translated_sampler_bindings.h`, both already on main, take the view count). - At draw time the view is made from the unordered-access view the title created at that table entry (view token, slot 19 record), on mip 0 of a 2D texture, and the texture is moved to `UNORDERED_ACCESS` for the draw. - As asked on #1996, the binding is self-contained in `d3d12_draw.inl` (`read_pixel_uav_line`, `pixel_uav_view`, `resolve_pixel_uavs`); no new shared header. `Pass` keeps the last accepted render and depth targets (`bound_targets`, `bound_depth`) so the draw can compare them; the existing `trace_targets` are filled only while the red-producer diagnostic is on. Refused by name, with nothing bound in place of the view: - when the manifest is loaded (the translation is not used): another image kind, a buffer line (`uav N raw table P O`, the vertex-stage store of #2059, or the older `uav N table P O`), a view qualifier, another source, an extra field such as `channels`, a view index out of order, more than eight views; - at draw time (the draw is not translated): no table at the parameter, an entry outside the bound table, an entry without a view, an entry that is not an unordered-access view, a resource without `ALLOW_UNORDERED_ACCESS`, an array, 3D, 1D or multisampled resource, a view of another dimension, mip or plane, an integer, sRGB or non-colour format, a format without typed UAV store on the device, and a texture that is also an SRV, a render target or the depth texture of the same draw. These checks run before any view of the draw is written or any texture changes state. - Indirect draws (slot 61) refuse a translation with a `uav` line, counted in the #2333 census as `unsupported_resource_or_entry`. Out of scope: compute UAVs (#2274 B) and barriers between draws that write and read the same texture. ## Verification Commit `1247a2895` on `fbe249f68` (rebased; the previous head was `e1d5a997b` on `b442b57fb`). `git merge-tree` with today's main (`f02ebd669`) is clean. Windows 11 (10.0.26200), MSVC 14.44, NVIDIA GeForce RTX 3070 driver 32.0.16.2101, and WARP 10.0.26100.9818, debug layer on. ```powershell cmake --build --preset dev ctest --preset dev --no-tests=error -R '^startup_pixel_uav_' -V ctest --preset dev --no-tests=error -R '^startup_' ``` - `startup_pixel_uav_warp` and `startup_pixel_uav_hardware` passed (2/2) in each of two runs on `1247a2895`: 21 cases and the exec guard control on each adapter, debug layer on with 0 errors in every case (42 of 42 per run); `a.buffer-line` is refused by name on both adapters. The previous head `e1d5a997b` passed the same way, and @Makto94 ran it on an RTX 3070 Ti. - Neighbouring runtime, stream and draw tests on `1247a2895`, `ctest --preset dev --no-tests=error -R "^startup_(stream_|draw|pixel_|indirect|sampler|image_|formatted|clear_uav|list_uav|gfx2hlsl_buffer_store|d16_srv|frame_copy|mrt|joined|root_|view_|memory_srv|mubuf)"`: 214 tests, 0 failed, 1 skipped with its existing capability reason (`startup_view_heap_warp`), 623 s. This includes `startup_joined_table_pointer_*` (#2507, whose `X2W_TEST_JOINED_TABLE` flag met ours in `startup_stream_consumer.cpp`), formatted buffers and views, indirect draws, ClearUAV, UAV barriers and `startup_gfx2hlsl_buffer_store` (#2059). - The whole `^startup_` suite on the first rebase of this change (`294178042`, on `8ecaa8ec9`, same code): 897 tests, 0 failed, 9 skipped with their existing capability reasons, 2057 s. It was not repeated on `1247a2895`, whose base adds 16 commits; those that touch the same files (#2002 vertex fetch without elements, #1974/#1975 compute slots, #2648 slot 76) do not touch the translated root signature, the view table or the UAV binding, and the subset above covers the draw path. - Release preset: not run. What the 21 cases check (`tests/startup_pixel_uav_check.py`, each case its own process): - Drawn: the table names texture A (an explicit 2D view) or texture B (a view created without a description). Texel (1, 2) of mip 0 of that texture holds 1.0, 2.0, 3.0, 4.0. Every other word of the four textures, both mips (320 words), keeps its sentinel. - Refused, each with its logged reason and every word unchanged: table entry without a view, an SRV entry, a texture without `ALLOW_UNORDERED_ACCESS`, a `R32G32B32A32_UINT` view, a view of mip 1, a one-slice 2D-array view, an entry outside the bound table, no table, the texture also bound as an SRV, the texture also bound as the draw's render target (a fifth texture with both flags, bound through list slot 50), and seven other manifest lines (including the compute form with `float` and `channels 4`). - Exec: the two `v_cmpx` variants from #2155 through the runtime. Exec on writes the texel; exec off leaves it. Negative controls: - Exec guard (in the test): the exec-off shader recompiled with the guard removed from the store must write the texel, and the check reports `texel_mismatch texture A mip 0 texel (1, 2) word 0: got 3f800000, expected c0000024` on both adapters. - Mutants of the runtime, rebuilt and run locally on both adapters, not part of the PR: - swapped table entry (the view read 32 bytes further on): cases a and b fail with the texel still at its sentinel; - `ALLOW_UNORDERED_ACCESS` check removed: `no-ua` fails, the debug layer reports IDs 340 and 524 and the device is removed (0x887a0001); - mip 1 bound instead of mip 0: cases a and b fail (the store at (1, 2) falls outside the 2x2 mip and mip 0 keeps its sentinel); - render/depth target check removed: `target` fails, the debug layer reports ID 538 (the render target is in `UNORDERED_ACCESS` at the draw). - The four mutants and the fail-first run were made on an earlier base. Since then the change differs only in the indirect refusal line (the #2333 census code); the rebase onto `b442b57fb` added the manifest-version and `raw` line handling described above (covered by the `a.buffer-line` case), and the rebase onto `fbe249f68` changed only conflict context (docs wording from the compute image store, and the environment-variable list in `startup_stream_consumer.cpp`). - Fail-first on main: the same test fails on every case (including `target`), and the log shows `stores to an image (uav 0 tex2d table 0 0); pixel-stage UAVs are not bound yet, translation not used`. - Without the debug layer (`X2W_PIXEL_UAV_NO_DEBUG=1`, as on a machine without it) the cases still run and report `debug layer: absent`; the zero-error requirement applies only when the layer is on. ## Evidence and follow-up - The pixel program is the hand-assembled one from #2155 (`tests/startup_pixel_image_store_check.py`, no bytes from any retail software). I assembled its source and the two `v_cmpx` variants with clang 15.0.7 (`--target=amdgcn-amd-amdhsa -mcpu=gfx1013`) and extracted `.text` with llvm-objcopy 15: all three match the recorded words (64, 68 and 68 bytes). That is the reassembly #2155 could not run; it is not part of the CI test. - `tests/startup_pixel_uav.cpp` (a `startup_stream_consumer` mode) creates the textures through device slot 127, the views through slots 18, 19 and 20 and the table through list slot 36, so the draw goes through the same path as a title. - The title's descriptor stride differs by adapter (64 bytes on WARP, 32 on the RTX 3070); the test does not depend on it. - Stage of the store: the graphics manifest does not name the stage of a `uav` line. On main `op_image_store` accepts only pixel and compute stages, and compute writes its own manifest (`stage cs`, `uav N tex2d float … channels 4`, not read by `load_translation`), so in a graphics manifest only the pixel stage writes a `tex2d` line; a vertex-stage store is always a `raw` line (`op_buffer_store_vs`), which is refused here. The view table is visible to all stages, so the binding does not depend on the stage either. If a later change lets another graphics stage store to an image, the manifest should carry the stage. - Retired textures (#2468): the bound texture is not `retire_hold`-ed like a sampled one, because `retire_classify` already keeps every resource with `ALLOW_UNORDERED_ACCESS` (which this binding requires) out of the retire class. - Overlap: #2059 (merged) refused every version 2 manifest so that its offline vertex buffer stores never run. This change reads version 2 for the pixel `tex2d` line and refuses its `uav N raw table P O` line by name, so those stores still never run; the `a.buffer-line` case checks that refusal on both adapters. The draft #2603 binds the same pixel `uav` line in `d3d12_draw.inl` in another layout; the overlap is described in a comment on this PR. - Not tested: AMD and Intel GPUs, console hardware, a title's own resources (whether they carry `ALLOW_UNORDERED_ACCESS` decides how often this binds), indirect draws with a `uav` line (refused, no fixture), resources the runtime creates by title address (refused by name, no fixture), and a UAV of the bound depth texture (refused by name with the render-target check, no fixture). ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
tedin7 commented 2026-11-25 19:03:48 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:25:47Z.

Review: COMMENTED


Review of head e1d5a997 (Linux-side read, no Windows run by me).

What I checked

  • Manifest: x2w-manifest 2 is accepted and every uav line is either bound (uav N tex2d table P O) or refused by name at load time. Raw/buffer views, qualifiers, extra fields, out-of-order index and more than 8 views all keep the old "translation not used" behavior.
  • Binding (resolve_pixel_uavs): all refusals happen before any view or state change is recorded. Slot 19 (UAV) is required, mip/plane/array/MSAA/format/typed-store support are checked, and a texture that is also a render target, depth target or SRV of the same draw is refused. Indirect draws with UAVs are refused.
  • Root signature: the SRV range and the UAV range share one table, with the UAV range offset by the SRV count. sampler_root_parameter(views) and the draw-time descriptor math use srvs + uavs consistently. Existing callers of create_translated_root keep the default uavs = 0, so their layout is unchanged.
  • bound_targets / bound_depth are copied from the same local array the existing trace code copies (8 entries), so no new out-of-range read.
  • Test: tests/startup_pixel_uav_check.py + tests/startup_pixel_uav.cpp draw through the real runtime on D3D12 and read back every word of four textures (both mips), so it guards the stored texel, the untouched words, each named refusal, and the exec on/off cases with a control. It is wired into CTest per backend and added to the existing startup_stream_consumer binary rather than a new one.
  • Overlap: #2155 (merged) added the lowering; this is the runtime half of the same item. No open PR touches the same code (#2399 is compute-only).
  • Scope: runtime + docs + tests, no .github/launcher/hooks.

Commands run (Linux, in a review worktree at the head SHA)

  • git diff --check origin/main...HEAD : clean
  • python3 tests/docs_links_check.py : passed (19 files, 465 links)
  • python3 tests/bidi_controls_check.py : passed (1727 files)

Not verified by me

  • The new test needs Windows/WARP, so I could not run it or mutate the runtime code here. The PR's CI shows "Build and test on Windows" SUCCESS on this head; the author posted no separate Win2025 results comment, and the /O2 job was skipped.
  • The branch is 24 commits behind main; I did not update it (that would change the head SHA).

No blocking findings.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6062852471 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2448#pullrequestreview-6062852471). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T18:25:47Z. **Review:** COMMENTED --- Review of head e1d5a997 (Linux-side read, no Windows run by me). What I checked - Manifest: `x2w-manifest 2` is accepted and every `uav` line is either bound (`uav N tex2d table P O`) or refused by name at load time. Raw/buffer views, qualifiers, extra fields, out-of-order index and more than 8 views all keep the old "translation not used" behavior. - Binding (`resolve_pixel_uavs`): all refusals happen before any view or state change is recorded. Slot 19 (UAV) is required, mip/plane/array/MSAA/format/typed-store support are checked, and a texture that is also a render target, depth target or SRV of the same draw is refused. Indirect draws with UAVs are refused. - Root signature: the SRV range and the UAV range share one table, with the UAV range offset by the SRV count. `sampler_root_parameter(views)` and the draw-time descriptor math use `srvs + uavs` consistently. Existing callers of `create_translated_root` keep the default `uavs = 0`, so their layout is unchanged. - `bound_targets` / `bound_depth` are copied from the same local array the existing trace code copies (8 entries), so no new out-of-range read. - Test: `tests/startup_pixel_uav_check.py` + `tests/startup_pixel_uav.cpp` draw through the real runtime on D3D12 and read back every word of four textures (both mips), so it guards the stored texel, the untouched words, each named refusal, and the exec on/off cases with a control. It is wired into CTest per backend and added to the existing `startup_stream_consumer` binary rather than a new one. - Overlap: #2155 (merged) added the lowering; this is the runtime half of the same item. No open PR touches the same code (#2399 is compute-only). - Scope: runtime + docs + tests, no .github/launcher/hooks. Commands run (Linux, in a review worktree at the head SHA) - `git diff --check origin/main...HEAD` : clean - `python3 tests/docs_links_check.py` : passed (19 files, 465 links) - `python3 tests/bidi_controls_check.py` : passed (1727 files) Not verified by me - The new test needs Windows/WARP, so I could not run it or mutate the runtime code here. The PR's CI shows "Build and test on Windows" SUCCESS on this head; the author posted no separate Win2025 results comment, and the /O2 job was skipped. - The branch is 24 commits behind main; I did not update it (that would change the head SHA). No blocking findings. AI-assisted; commands listed were executed locally.
Makto94 commented 2026-11-25 20:04:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-25T19:41:50Z.


Hardware run and Windows 11 MSVC build at head e1d5a997.

Environment: Windows 11 Pro build 26300.9974, Debug (dev preset), MSVC toolset 14.44.35207 (cl 19.44.35230.0), driver 32.0.16.2101. The hardware test prints adapter=NVIDIA GeForce RTX 3070 Ti driver=32.0.16.2101 with debug layer: on, errors: 0 in every case. The runs were serial (-j1). The PR body reports an RTX 3070 run on the same driver version; this run used an RTX 3070 Ti.

Build: cmake --build --preset dev exited 0 (this PR changes C++ in src/startup_stubs/ and tests/, so the build was rerun at this head).

Tests:

  • ctest --preset dev --no-tests=error -j1 -R '^startup_pixel_uav_' -E hardware -V: 1/1 passed (startup_pixel_uav_warp).
  • ctest --preset dev --no-tests=error -j1 -R '^startup_pixel_uav_' -N lists one hardware test, startup_pixel_uav_hardware.
  • ctest --preset dev --no-tests=error -j1 -R '^(startup_pixel_uav_hardware)$' -V: 1/1 passed. 0 capability skips (77).

The hardware test prints hardware: 21 cases and the exec guard control:

  • Drawn, texel (1, 2) written and every other word unchanged: a (texture A) and b (texture B). a.exec-on is drawn with the texel written; a.exec-off is drawn with every word unchanged.
  • 17 cases refused with every word unchanged, each with its logged reason: missing, srv, no-ua, uint, mip1, array, out-of-range, no-table, srv-and-uav, target, and the manifest lines a.float-line, a.compute-line, a.tex2da-line, a.buffer-line, a.uint-line, a.channels-field, a.second-view.
  • Control: control exec guard removed: fails as expected (texel_mismatch texture A mip 0 texel (1, 2) word 0: got 3f800000, expected c0000024).

The WARP run (adapter=Microsoft Basic Render Driver, driver 10.0.26100.9818) prints the same 21 cases with the same outcomes and reasons, the same control failure, and debug layer: on, errors: 0 in every case. The descriptor stride printed is 32 on the RTX and 64 on WARP, as the PR body describes.

On the PR so far: the review of e1d5a997 says "The new test needs Windows/WARP, so I could not run it or mutate the runtime code here", and the PR body lists "Release preset: not run". I found no NVIDIA run from anyone other than the author on this head.

Not covered by this run: NVIDIA only (RTX 3070 Ti); no AMD or Intel GPU; no Release build; the wider ctest -R '^startup_' suite was not run; the four runtime mutants in the PR body (swapped table entry, ALLOW_UNORDERED_ACCESS check removed, mip 1 instead of mip 0, render/depth target check removed) were not rerun here; the fail-first run on main was not repeated.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172647208 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2448#issuecomment-7172647208). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-25T19:41:50Z. --- Hardware run and Windows 11 MSVC build at head `e1d5a997`. Environment: Windows 11 Pro build 26300.9974, Debug (`dev` preset), MSVC toolset 14.44.35207 (cl 19.44.35230.0), driver 32.0.16.2101. The hardware test prints `adapter=NVIDIA GeForce RTX 3070 Ti driver=32.0.16.2101` with `debug layer: on, errors: 0` in every case. The runs were serial (`-j1`). The PR body reports an RTX 3070 run on the same driver version; this run used an RTX 3070 Ti. Build: `cmake --build --preset dev` exited 0 (this PR changes C++ in `src/startup_stubs/` and `tests/`, so the build was rerun at this head). Tests: - `ctest --preset dev --no-tests=error -j1 -R '^startup_pixel_uav_' -E hardware -V`: 1/1 passed (`startup_pixel_uav_warp`). - `ctest --preset dev --no-tests=error -j1 -R '^startup_pixel_uav_' -N` lists one hardware test, `startup_pixel_uav_hardware`. - `ctest --preset dev --no-tests=error -j1 -R '^(startup_pixel_uav_hardware)$' -V`: 1/1 passed. 0 capability skips (77). The hardware test prints `hardware: 21 cases and the exec guard control`: - Drawn, `texel (1, 2)` written and every other word unchanged: `a` (texture A) and `b` (texture B). `a.exec-on` is drawn with the texel written; `a.exec-off` is drawn with every word unchanged. - 17 cases refused with every word unchanged, each with its logged reason: `missing`, `srv`, `no-ua`, `uint`, `mip1`, `array`, `out-of-range`, `no-table`, `srv-and-uav`, `target`, and the manifest lines `a.float-line`, `a.compute-line`, `a.tex2da-line`, `a.buffer-line`, `a.uint-line`, `a.channels-field`, `a.second-view`. - Control: `control exec guard removed: fails as expected (texel_mismatch texture A mip 0 texel (1, 2) word 0: got 3f800000, expected c0000024)`. The WARP run (`adapter=Microsoft Basic Render Driver`, driver 10.0.26100.9818) prints the same 21 cases with the same outcomes and reasons, the same control failure, and `debug layer: on, errors: 0` in every case. The descriptor stride printed is 32 on the RTX and 64 on WARP, as the PR body describes. On the PR so far: the review of `e1d5a997` says "The new test needs Windows/WARP, so I could not run it or mutate the runtime code here", and the PR body lists "Release preset: not run". I found no NVIDIA run from anyone other than the author on this head. Not covered by this run: NVIDIA only (RTX 3070 Ti); no AMD or Intel GPU; no Release build; the wider `ctest -R '^startup_'` suite was not run; the four runtime mutants in the PR body (swapped table entry, `ALLOW_UNORDERED_ACCESS` check removed, mip 1 instead of mip 0, render/depth target check removed) were not rerun here; the fail-first run on `main` was not repeated.
upstream-sync closed this pull request 2026-11-26 03:02:55 +00:00
roansystemlabs commented 2026-11-26 03:03:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-26T02:07:54Z.


@denn0x, a heads-up on overlap with your draft #2603, checked by diffing both heads (#2448 1247a289, rebased on fbe249f6; #2603 8634f27b); no runtime comparison yet.

Both PRs bind pixel-stage uav N tex2d table P O views in d3d12_draw.inl, so they meet in the same places:

  • load_translation: both drop the unsupported uav line refusal and add Translation::uavs;
  • draw_translated: #2448 puts the UAVs after the SRVs in table 1, #2603 gives them their own root parameter (uav_parameter);
  • git merge-tree of the two heads reports conflicts in d3d12_draw.inl and tests/startup_stream_draw.cpp that come from #2448 (the other conflicts, in d3d12_xs_device.cpp and gfx2hlsl.py, are between #2603 and today's main alone).

One thing that may matter for #2603 itself: at 8634f27b, load_translation still refuses any manifest other than x2w-manifest 1, while its gfx2hlsl.py writes x2w-manifest 2 for every pixel program with a stored image. startup_draw_uav_check.py (mode tex) appends the uav line to a version-1 manifest, so it passes, but a translator-written pixel store would be refused before bind_uav_texture. #2448 accepts version 2 for this reason, and still refuses the vertex-stage raw line of #2059 by name.

#2448 is small (10 files), has a hardware run from @Makto94 on the previous head e1d5a997, and its tests were re-run on WARP and an RTX 3070 after the rebase. Either way works for us:

  • #2448 lands first (now rebased on today's main) and #2603 rebases on top, keeping whichever table layout you prefer;
  • or #2603 absorbs it: then the x2w-manifest 2 acceptance and the refusal cases in startup_pixel_uav_check.py are the parts worth keeping, and I'll close #2448.

No rush, just say which you prefer.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180490883 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2448#issuecomment-7180490883). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-26T02:07:54Z. --- @denn0x, a heads-up on overlap with your draft #2603, checked by diffing both heads (#2448 `1247a289`, rebased on `fbe249f6`; #2603 `8634f27b`); no runtime comparison yet. Both PRs bind pixel-stage `uav N tex2d table P O` views in `d3d12_draw.inl`, so they meet in the same places: - `load_translation`: both drop the `unsupported uav line` refusal and add `Translation::uavs`; - `draw_translated`: #2448 puts the UAVs after the SRVs in table 1, #2603 gives them their own root parameter (`uav_parameter`); - `git merge-tree` of the two heads reports conflicts in `d3d12_draw.inl` and `tests/startup_stream_draw.cpp` that come from #2448 (the other conflicts, in `d3d12_xs_device.cpp` and `gfx2hlsl.py`, are between #2603 and today's `main` alone). One thing that may matter for #2603 itself: at `8634f27b`, `load_translation` still refuses any manifest other than `x2w-manifest 1`, while its `gfx2hlsl.py` writes `x2w-manifest 2` for every pixel program with a stored image. `startup_draw_uav_check.py` (mode `tex`) appends the `uav` line to a version-1 manifest, so it passes, but a translator-written pixel store would be refused before `bind_uav_texture`. #2448 accepts version 2 for this reason, and still refuses the vertex-stage `raw` line of #2059 by name. #2448 is small (10 files), has a hardware run from @Makto94 on the previous head `e1d5a997`, and its tests were re-run on WARP and an RTX 3070 after the rebase. Either way works for us: - #2448 lands first (now rebased on today's `main`) and #2603 rebases on top, keeping whichever table layout you prefer; - or #2603 absorbs it: then the `x2w-manifest 2` acceptance and the refusal cases in `startup_pixel_uav_check.py` are the parts worth keeping, and I'll close #2448. No rush, just say which you prefer. AI-assisted.
tedin7 commented 2026-11-26 03:03:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:34:15Z.


Update for the conflict with main (head a9f01aa5).

What I added:

  • Merged origin/main into the branch (no rebase). One conflict in src/startup_stubs/translated_sampler_bindings.h: main already has the uavs parameter and the UAV range in create_translated_root. I kept main's range code and the PR's sampler_root_parameter(views) change.
  • After the merge, startup_pixel_uav_{warp,hardware} failed in the no-ua case. Since #2649 the device records no view for a UAV over a resource without ALLOW_UNORDERED_ACCESS, so the draw is still refused with every word unchanged, but now with the reason table entry holds no view. I updated that one expected reason in tests/startup_pixel_uav_check.py.

Commands executed:

  • python3 tests/startup_pixel_uav_check.py, tests/docs_links_check.py, tests/bidi_controls_check.py, git diff --check on Linux: ok.
  • Win2025 WARP, dev and release builds of startup_stream_consumer and the sampler checks, then ctest ^startup_(pixel_uav|translated_sampler_bindings|sampler_comparison|frame_copy|d16_srv|mubuf_descriptor|address_volume_srv): 13/13 passed in dev and 13/13 in release (incl. startup_pixel_uav_warp and _hardware on WARP).

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180924162 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2448#issuecomment-7180924162). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T02:34:15Z. --- Update for the conflict with main (head a9f01aa5). What I added: - Merged `origin/main` into the branch (no rebase). One conflict in `src/startup_stubs/translated_sampler_bindings.h`: main already has the `uavs` parameter and the UAV range in `create_translated_root`. I kept main's range code and the PR's `sampler_root_parameter(views)` change. - After the merge, `startup_pixel_uav_{warp,hardware}` failed in the `no-ua` case. Since #2649 the device records no view for a UAV over a resource without ALLOW_UNORDERED_ACCESS, so the draw is still refused with every word unchanged, but now with the reason `table entry holds no view`. I updated that one expected reason in `tests/startup_pixel_uav_check.py`. Commands executed: - `python3 tests/startup_pixel_uav_check.py`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py`, `git diff --check` on Linux: ok. - Win2025 WARP, dev and release builds of `startup_stream_consumer` and the sampler checks, then ctest `^startup_(pixel_uav|translated_sampler_bindings|sampler_comparison|frame_copy|d16_srv|mubuf_descriptor|address_volume_srv)`: 13/13 passed in dev and 13/13 in release (incl. `startup_pixel_uav_warp` and `_hardware` on WARP). AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2440
No description provided.