GPU: bind large backed views in translated indirect draws #2469

Merged
R0Y00 merged 2 commits from upstream-pr/2477 into main 2026-11-26 09:52:03 +00:00
R0Y00 commented 2026-11-25 17:54:29 +00:00 (Migrated from github.com)

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


Bind a translated indirect draw's full raw SRV over existing GPU storage when the range fits its backing and the D3D12 raw element count. The old 16 MiB guard rejected the descriptor before checking the resource. The change keeps the ownership, offset, resource state and copy provenance checks. It adds no upload or memory copy.

The source-built fixture writes two different colors 16 bytes apart, then reads the last DWORD through a nonzero-offset view. Shortening the view by one element leaves the sentinel in GPU memory and makes the shader read zero. This control detects a widened or misbased view.

Verified on fe10936e, Windows 11 build 26200.9974, RTX 4060 Laptop (32.0.16.1656) and Microsoft WARP, D3D12 debug layer enabled on both.

cmake --build --preset release --target startup_indirect_draw_indexed
ctest --preset release -j1 --no-tests=error -R '^startup_indirect_(translated_draw|copy_provenance(_off)?|translated_indexed)_(warp|hardware)$' -V

8 tests passed, 0 skips. On each backend the complete view produced 8/8 red pixels and the shortened view 0/8 non-clear pixels, with the argument guard words intact. On WARP the same fixture against the former 16 MiB limit returned black in all eight pixels of the positive case.

Refs #874.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6610459580 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T17:54:29Z. --- Bind a translated indirect draw's full raw SRV over existing GPU storage when the range fits its backing and the D3D12 raw element count. The old 16 MiB guard rejected the descriptor before checking the resource. The change keeps the ownership, offset, resource state and copy provenance checks. It adds no upload or memory copy. The source-built fixture writes two different colors 16 bytes apart, then reads the last DWORD through a nonzero-offset view. Shortening the view by one element leaves the sentinel in GPU memory and makes the shader read zero. This control detects a widened or misbased view. Verified on fe10936e, Windows 11 build 26200.9974, RTX 4060 Laptop (32.0.16.1656) and Microsoft WARP, D3D12 debug layer enabled on both. ```powershell cmake --build --preset release --target startup_indirect_draw_indexed ctest --preset release -j1 --no-tests=error -R '^startup_indirect_(translated_draw|copy_provenance(_off)?|translated_indexed)_(warp|hardware)$' -V ``` 8 tests passed, 0 skips. On each backend the complete view produced 8/8 red pixels and the shortened view 0/8 non-clear pixels, with the argument guard words intact. On WARP the same fixture against the former 16 MiB limit returned black in all eight pixels of the positive case. Refs #874.
tedin7 commented 2026-11-25 18:32:28 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Code review of head fe10936e38ceaa3f648098ad866d76eb17ee55b5. Comment only; I did not run Windows or the game.

Checked in the diff

  • src/startup_stubs/d3d12_draw.inl (indirect_table_buffer): the fixed 16 MiB cap is replaced by bytes / 4 > 2^D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP (2^27 raw elements, 512 MiB). The bytes % 4 and !bytes checks stay. bytes is built from a 14-bit stride times a 32-bit count in u64, so it cannot overflow.
  • The limit is not the only guard. Later in the same function the range still has to fit the real resource (offset > desc.Width || bytes > desc.Width - offset is refused), and the offset alignment, owner, device, initial_state, DENY_SHADER_RESOURCE and copied-range provenance checks are untouched. The upload-ring branch also still validates the range through list_upload_range. Nothing is copied.
  • Both callers (d3d12_draw.inl around lines 2067 and 2071: the indexed vertex-stream case and the table-descriptor case) get the same relaxed limit. Both still go through the same backing check.
  • The separate 16u << 20 clamp near line 2121 is on a different path (descriptor binding for buffer_view, not the indirect translated draw). It is not touched here, so a title that reads a large buffer through that path still gets the old clamp. Fine for this slice, but worth knowing.
  • Test: the existing startup_indirect_translated_draw_* suite is extended (not a new suite). The fixture builds a buffer of 0x1000020 bytes, writes green at +0x100000c and red at +0x100001c, and reads the last DWORD. The full view must give red. A view one element short must hit the existing insufficient_table_range refusal. This is a real D3D12 readback checked against an expected colour, with a negative control that catches a widened or misbased view. The TableSample enum change is a mechanical refactor of the helper's bool flag.
  • Docs: docs/experiments.md describes the new behaviour and the control.
  • No other open or merged PR covers this change (searched "indirect raw SRV 16 MiB"). The body says "Refs #874" only, with no dependency on another PR.
  • Scope is small and additive. No .github, launcher or hook changes.

Commands run (Linux, in a worktree of the exact head)

  • git diff --check origin/main...HEAD: clean
  • python3 tests/docs_links_check.py: passed (19 files, 466 links)
  • python3 tests/bidi_controls_check.py: passed
  • I could not do a code mutation here. The code and its test build only with MSVC/D3D12.

Windows / CI results, with the SHA each one covers

  • The author posted 8/8 tests passed (WARP and RTX 4060) with 0 skips on this exact head fe10936e.
  • The PR's CI run on this head: Windows build and test, the Linux Python checks and the gfx1013 fixtures all pass. The /O2 job was skipped.
  • I did not update the branch, so those results stay tied to this SHA.

Notes for @R0Y00

  • No game result is posted and I make no claim about startup progress.
  • The only evidence for the "former 16 MiB limit returned black" statement is the author's own run on WARP. I did not reproduce it.

No blocking findings from the code and test review.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6062937877 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#pullrequestreview-6062937877). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T18:32:28Z. **Review:** COMMENTED --- Code review of head `fe10936e38ceaa3f648098ad866d76eb17ee55b5`. Comment only; I did not run Windows or the game. **Checked in the diff** - `src/startup_stubs/d3d12_draw.inl` (`indirect_table_buffer`): the fixed 16 MiB cap is replaced by `bytes / 4 > 2^D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP` (2^27 raw elements, 512 MiB). The `bytes % 4` and `!bytes` checks stay. `bytes` is built from a 14-bit stride times a 32-bit count in `u64`, so it cannot overflow. - The limit is not the only guard. Later in the same function the range still has to fit the real resource (`offset > desc.Width || bytes > desc.Width - offset` is refused), and the offset alignment, owner, device, `initial_state`, `DENY_SHADER_RESOURCE` and copied-range provenance checks are untouched. The upload-ring branch also still validates the range through `list_upload_range`. Nothing is copied. - Both callers (`d3d12_draw.inl` around lines 2067 and 2071: the indexed vertex-stream case and the table-descriptor case) get the same relaxed limit. Both still go through the same backing check. - The separate `16u << 20` clamp near line 2121 is on a different path (descriptor binding for `buffer_view`, not the indirect translated draw). It is not touched here, so a title that reads a large buffer through that path still gets the old clamp. Fine for this slice, but worth knowing. - Test: the existing `startup_indirect_translated_draw_*` suite is extended (not a new suite). The fixture builds a buffer of 0x1000020 bytes, writes green at +0x100000c and red at +0x100001c, and reads the last DWORD. The full view must give red. A view one element short must hit the existing `insufficient_table_range` refusal. This is a real D3D12 readback checked against an expected colour, with a negative control that catches a widened or misbased view. The `TableSample` enum change is a mechanical refactor of the helper's bool flag. - Docs: `docs/experiments.md` describes the new behaviour and the control. - No other open or merged PR covers this change (searched "indirect raw SRV 16 MiB"). The body says "Refs #874" only, with no dependency on another PR. - Scope is small and additive. No `.github`, launcher or hook changes. **Commands run (Linux, in a worktree of the exact head)** - `git diff --check origin/main...HEAD`: clean - `python3 tests/docs_links_check.py`: passed (19 files, 466 links) - `python3 tests/bidi_controls_check.py`: passed - I could not do a code mutation here. The code and its test build only with MSVC/D3D12. **Windows / CI results, with the SHA each one covers** - The author posted 8/8 tests passed (WARP and RTX 4060) with 0 skips on this exact head `fe10936e`. - The PR's CI run on this head: Windows build and test, the Linux Python checks and the gfx1013 fixtures all pass. The `/O2` job was skipped. - I did not update the branch, so those results stay tied to this SHA. **Notes for @R0Y00** - No game result is posted and I make no claim about startup progress. - The only evidence for the "former 16 MiB limit returned black" statement is the author's own run on WARP. I did not reproduce it. No blocking findings from the code and test review. AI-assisted; commands listed were executed locally.
ChazY11 commented 2026-11-25 19:04:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-25T19:01:33Z.


Reading-only review — I cannot build on this host (the full CMake build stops in DXC with
unable to create compilation: AccessDenied on unrelated targets), so nothing below is a run result.

The constant is the right one, and the arithmetic is safe

constexpr u64 max_raw_elements = u64{1} << D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP;   // 2^27
if (!bytes || bytes % 4 || bytes / 4 > max_raw_elements) return {};

D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP is 27, so the bound is 2^27 R32 elements. The u64{1} << 27 shift is well inside u64, and bytes / 4 cannot overflow before the comparison, so the arithmetic is fine. Dividing by a literal 4 is correct because the view this guards is the raw R32 one — d3d12_draw.inl:1117 sets DXGI_FORMAT_R32_TYPELESS with D3D12_BUFFER_SRV_FLAG_RAW, and FirstElement = offset / 4, so bytes-per-element 4 is the same unit the view uses.

Raise from 16 MiB to 512 MiB is the intended change and the check is now the API limit rather than an arbitrary ceiling. Good.

The part I would look at before merging

16 MiB is used in two other places in the same file and one in the capture code, and it is still applied unconditionally:

d3d12_draw.inl:2121     if (bytes > (16u << 20)) bytes = 16u << 20;      // clamps the binding range
d3d12_capture.inl:356   const DWORD part = bytes > (16u << 20) ? (16u << 20) : ...;

Line 2121 sits on the path that computes bytes for a hardware buffer descriptor before this function's new check sees it (the srv.source == 0 && words[0] != view_token_magic && entry arm). So a view that this PR now admits at, say, 64 MiB can still arrive at buffer_view() with NumElements computed from a range that was silently clamped to 16 MiB. The failure mode changes from "indirect_table_buffer returns {}" to "a raw SRV whose NumElements covers a quarter of the resource" — which is a wrong result rather than a refusal.

I am not claiming that is what happens for the fixture this PR adds: its buffer is presumably well under 16 MiB, so the clamp never bites and the test passes either way. The question is what the 512 MiB admission is for. If it exists to bind large backed views, the clamp at 2121 has to move with it, or the two constants will disagree wherever the clamp applies.

Worth checking whether line 2121's arm can even reach indirect_table_buffer — if the token magic path is the only one that gets here, the clamp is off the path and this is a non-issue. That distinction is exactly what I cannot settle without building.

What the test changes tell me

tests/startup_indirect_draw_indexed.cpp grows by 50 lines with 12 removed, so a case was reworked rather than just added. If the new case binds a buffer above 16 MiB and asserts the draw reads the right words, it would also demonstrate which of the two constants wins — that is the assertion I would look for, and if it is present, please say so and this concern is answered.

Docs

docs/experiments.md gains 6 lines describing the larger backing. If the 16 MiB clamp at 2121 stays, the doc should not read as "any size up to the API limit binds correctly".

AI-assisted; reviewed by reading only, no build or run on this host.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7171719101 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#issuecomment-7171719101). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-25T19:01:33Z. --- Reading-only review — I cannot build on this host (the full CMake build stops in DXC with `unable to create compilation: AccessDenied` on unrelated targets), so nothing below is a run result. ## The constant is the right one, and the arithmetic is safe ```cpp constexpr u64 max_raw_elements = u64{1} << D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP; // 2^27 if (!bytes || bytes % 4 || bytes / 4 > max_raw_elements) return {}; ``` `D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP` is 27, so the bound is 2^27 R32 elements. The `u64{1} << 27` shift is well inside `u64`, and `bytes / 4` cannot overflow before the comparison, so the arithmetic is fine. Dividing by a literal 4 is correct because the view this guards is the raw R32 one — `d3d12_draw.inl:1117` sets `DXGI_FORMAT_R32_TYPELESS` with `D3D12_BUFFER_SRV_FLAG_RAW`, and `FirstElement = offset / 4`, so bytes-per-element 4 is the same unit the view uses. Raise from 16 MiB to 512 MiB is the intended change and the check is now the API limit rather than an arbitrary ceiling. Good. ## The part I would look at before merging **16 MiB is used in two other places in the same file and one in the capture code, and it is still applied unconditionally:** ```text d3d12_draw.inl:2121 if (bytes > (16u << 20)) bytes = 16u << 20; // clamps the binding range d3d12_capture.inl:356 const DWORD part = bytes > (16u << 20) ? (16u << 20) : ...; ``` Line 2121 sits on the path that computes `bytes` for a hardware buffer descriptor *before* this function's new check sees it (the `srv.source == 0 && words[0] != view_token_magic && entry` arm). So a view that this PR now admits at, say, 64 MiB can still arrive at `buffer_view()` with `NumElements` computed from a range that was silently clamped to 16 MiB. The failure mode changes from *"`indirect_table_buffer` returns `{}`"* to *"a raw SRV whose `NumElements` covers a quarter of the resource"* — which is a wrong result rather than a refusal. I am not claiming that is what happens for the fixture this PR adds: its buffer is presumably well under 16 MiB, so the clamp never bites and the test passes either way. The question is what the 512 MiB admission is *for*. If it exists to bind large backed views, the clamp at 2121 has to move with it, or the two constants will disagree wherever the clamp applies. Worth checking whether line 2121's arm can even reach `indirect_table_buffer` — if the token magic path is the only one that gets here, the clamp is off the path and this is a non-issue. That distinction is exactly what I cannot settle without building. ## What the test changes tell me `tests/startup_indirect_draw_indexed.cpp` grows by 50 lines with 12 removed, so a case was reworked rather than just added. If the new case binds a buffer above 16 MiB and asserts the draw reads the right words, it would also demonstrate which of the two constants wins — that is the assertion I would look for, and if it is present, please say so and this concern is answered. ## Docs `docs/experiments.md` gains 6 lines describing the larger backing. If the 16 MiB clamp at 2121 stays, the doc should not read as "any size up to the API limit binds correctly". AI-assisted; reviewed by reading only, no build or run on this host.
R0Y00 commented 2026-11-25 21:01:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T20:20:08Z.


Independent Windows Release run on fe10936e: 17/17 selected indirect draw and refusal CTests passed, zero skips, on WARP and RTX 4060 Laptop. The >16 MiB draw returned 8/8 expected pixels through the complete nonzero-offset view and 0/8 after shortening the view, with guard words intact on both. The result covers the existing backed-view route in indirect_table_buffer; any subsequent use of the separate direct buffer_view clamp remains outside this test. This is ready for an independent maintainer's merge review on the tested head. The #870 matched replay still has its own acceptance.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173516180 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#issuecomment-7173516180). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T20:20:08Z. --- Independent Windows Release run on `fe10936e`: 17/17 selected indirect draw and refusal CTests passed, zero skips, on WARP and RTX 4060 Laptop. The >16 MiB draw returned 8/8 expected pixels through the complete nonzero-offset view and 0/8 after shortening the view, with guard words intact on both. The result covers the existing backed-view route in `indirect_table_buffer`; any subsequent use of the separate direct `buffer_view` clamp remains outside this test. This is ready for an independent maintainer's merge review on the tested head. The #870 matched replay still has its own acceptance.
tedin7 commented 2026-11-26 04:04:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:17:23Z.


Conflict note for fe10936e (270 commits behind main, CONFLICTING).

The only textual conflict is the TranslatedDrawFixture constructor in tests/startup_indirect_draw_indexed.cpp. Main added bool allow_rt = false after replay. This PR added UINT committed_bytes = 64. Resolution: keep both, ..., bool replay = false, bool allow_rt = false, UINT committed_bytes = 64. Then the large-view call site must pass false for allow_rt: TranslatedDrawFixture large(guest.Get(), 0, device.Get(), short_view, false, false, false, 0x1000020);. Without that edit the value 0x1000020 silently binds to allow_rt.

I did not push to the branch (maintainer edits are off). Merged tree checked locally, nothing pushed:

  • x2w_pipe.py win2025 2477 --patch <merged-tree diff> --targets startup_indirect_draw_indexed --regex '^startup_indirect_'
  • dev and release: 100% passed of 73 (43 passed, 30 _hardware capability skips on the VM, reported as skips, not passes). The WARP large-view cases are in the passed set.
  • Hardware GPU results on the merged tree are not covered here; the author's RTX 4060 run is on the old head.

Please merge main into the branch (or tell me to). After that the PR needs a fresh merge_check and review on the new head.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181575277 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#issuecomment-7181575277). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:17:23Z. --- Conflict note for `fe10936e` (270 commits behind main, `CONFLICTING`). The only textual conflict is the `TranslatedDrawFixture` constructor in `tests/startup_indirect_draw_indexed.cpp`. Main added `bool allow_rt = false` after `replay`. This PR added `UINT committed_bytes = 64`. Resolution: keep both, `..., bool replay = false, bool allow_rt = false, UINT committed_bytes = 64`. Then the large-view call site must pass `false` for `allow_rt`: `TranslatedDrawFixture large(guest.Get(), 0, device.Get(), short_view, false, false, false, 0x1000020);`. Without that edit the value `0x1000020` silently binds to `allow_rt`. I did not push to the branch (maintainer edits are off). Merged tree checked locally, nothing pushed: - `x2w_pipe.py win2025 2477 --patch <merged-tree diff> --targets startup_indirect_draw_indexed --regex '^startup_indirect_'` - dev and release: 100% passed of 73 (43 passed, 30 `_hardware` capability skips on the VM, reported as skips, not passes). The WARP large-view cases are in the passed set. - Hardware GPU results on the merged tree are not covered here; the author's RTX 4060 run is on the old head. Please merge main into the branch (or tell me to). After that the PR needs a fresh `merge_check` and review on the new head. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 08:01:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T07:24:38Z.


Updated the branch to f1cf4b46 after testing it against main at f1a8db63. It keeps the newer compute diagnostic and its 16 MiB limit, and keeps the cap on opening a new address alias. A translated draw with an existing GPU-backed range can now use the complete raw SRV.

Windows Release, Windows 11 build 26200, serial WARP and RTX 4060 Laptop, debug layer enabled. All 20 indirect draw, provenance/refusal and compute input CTests passed, zero skips. On each adapter the nonzero-offset view beyond 16 MiB rendered 8/8 pixels. Shortening the view rendered 0/8. Guard words stayed intact. Command: ctest --preset release --no-tests=error -j 1 -R "^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|other_refusal_census)(warp|hardware)|startup_compute_dispatch_input(warp|hardware))$" -V.

This is a source-built draw result. The original-executable matched replay remains separate. Ready for independent review on this head.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7185425302 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#issuecomment-7185425302). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T07:24:38Z. --- Updated the branch to f1cf4b46 after testing it against main at f1a8db63. It keeps the newer compute diagnostic and its 16 MiB limit, and keeps the cap on opening a new address alias. A translated draw with an existing GPU-backed range can now use the complete raw SRV. Windows Release, Windows 11 build 26200, serial WARP and RTX 4060 Laptop, debug layer enabled. All 20 indirect draw, provenance/refusal and compute input CTests passed, zero skips. On each adapter the nonzero-offset view beyond 16 MiB rendered 8/8 pixels. Shortening the view rendered 0/8. Guard words stayed intact. Command: ctest --preset release --no-tests=error -j 1 -R "^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|other_refusal_census)_(warp|hardware)|startup_compute_dispatch_input_(warp|hardware))$" -V. This is a source-built draw result. The original-executable matched replay remains separate. Ready for independent review on this head.
tedin7 commented 2026-11-26 09:51:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T09:51:32Z.

Review: COMMENTED


Review of head f1cf4b46 (20 commits behind main, no conflicts).

Code: indirect_table_buffer now takes a limit argument. The translated draw path uses the D3D12 raw-view limit. The compute path passes 16u << 20 explicitly, so its behavior is unchanged. Address-alias opening stays capped at 16 MiB. The ownership, offset, state and copy provenance checks are untouched. The refusal text differs per limit.

Test: translated_buffer_tail_pixel reads the last DWORD of a view 16 bytes beyond 16 MiB. The shortened-view control must read zero, so a widened or misbased view fails it. The fixture ids and manifest choice stay separate per sample kind.

Checked on Linux: git diff --check, tests/docs_links_check.py, tests/bidi_controls_check.py all pass. CI on the head is green. I did not run a code mutation myself (the fixture is Windows-only). The built-in shortened-view control is the negative control.

This is a source-built draw result. It makes no startup claim, so I found no blocker.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit f1cf4b4665d4a8da2bdc18ea6b713b2444e1d962:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 28.35s (configure 1.84s)
    • Test (ctest --preset dev -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure): 12/12 passed (1.07s: startup_indirect_copy_provenance_off_warp 0.20s, startup_indirect_translated_indexed_warp 0.19s, startup_indirect_copy_provenance_warp 0.20s, startup_indirect_translated_draw_warp 0.23s, startup_indirect_translated_indexed_rect_warp 0.20s, startup_indirect_translated_refusal_census_warp 0.15s, startup_indirect_translated_targets_warp 0.15s, startup_indirect_other_refusal_census_warp 0.14s, startup_indirect_translated_indexed_alias_warp 0.14s, startup_indirect_translated_indexed_upload_warp 0.15s, startup_indirect_translated_indexed_alias_off_warp 0.07s, startup_compute_dispatch_input_warp 0.95s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 54.67s (configure 1.84s)
    • Test (ctest --preset release -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure): 12/12 passed (1.10s: startup_indirect_translated_indexed_warp 0.18s, startup_indirect_translated_indexed_rect_warp 0.19s, startup_indirect_translated_draw_warp 0.21s, startup_indirect_copy_provenance_off_warp 0.20s, startup_indirect_copy_provenance_warp 0.23s, startup_indirect_translated_targets_warp 0.11s, startup_indirect_translated_refusal_census_warp 0.11s, startup_indirect_translated_indexed_alias_warp 0.12s, startup_indirect_other_refusal_census_warp 0.10s, startup_indirect_translated_indexed_upload_warp 0.12s, startup_indirect_translated_indexed_alias_off_warp 0.06s, startup_compute_dispatch_input_warp 0.99s)
  • sccache: 2/10 hits; wall 93.2s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6071878794 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#pullrequestreview-6071878794). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T09:51:32Z. **Review:** COMMENTED --- Review of head `f1cf4b46` (20 commits behind main, no conflicts). Code: `indirect_table_buffer` now takes a `limit` argument. The translated draw path uses the D3D12 raw-view limit. The compute path passes `16u << 20` explicitly, so its behavior is unchanged. Address-alias opening stays capped at 16 MiB. The ownership, offset, state and copy provenance checks are untouched. The refusal text differs per limit. Test: `translated_buffer_tail_pixel` reads the last DWORD of a view 16 bytes beyond 16 MiB. The shortened-view control must read zero, so a widened or misbased view fails it. The fixture ids and manifest choice stay separate per sample kind. Checked on Linux: `git diff --check`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py` all pass. CI on the head is green. I did not run a code mutation myself (the fixture is Windows-only). The built-in shortened-view control is the negative control. This is a source-built draw result. It makes no startup claim, so I found no blocker. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `f1cf4b4665d4a8da2bdc18ea6b713b2444e1d962`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `28.35s` (configure `1.84s`) - Test (`ctest --preset dev -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **12/12 passed** (`1.07s`: `startup_indirect_copy_provenance_off_warp` `0.20s`, `startup_indirect_translated_indexed_warp` `0.19s`, `startup_indirect_copy_provenance_warp` `0.20s`, `startup_indirect_translated_draw_warp` `0.23s`, `startup_indirect_translated_indexed_rect_warp` `0.20s`, `startup_indirect_translated_refusal_census_warp` `0.15s`, `startup_indirect_translated_targets_warp` `0.15s`, `startup_indirect_other_refusal_census_warp` `0.14s`, `startup_indirect_translated_indexed_alias_warp` `0.14s`, `startup_indirect_translated_indexed_upload_warp` `0.15s`, `startup_indirect_translated_indexed_alias_off_warp` `0.07s`, `startup_compute_dispatch_input_warp` `0.95s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `54.67s` (configure `1.84s`) - Test (`ctest --preset release -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **12/12 passed** (`1.10s`: `startup_indirect_translated_indexed_warp` `0.18s`, `startup_indirect_translated_indexed_rect_warp` `0.19s`, `startup_indirect_translated_draw_warp` `0.21s`, `startup_indirect_copy_provenance_off_warp` `0.20s`, `startup_indirect_copy_provenance_warp` `0.23s`, `startup_indirect_translated_targets_warp` `0.11s`, `startup_indirect_translated_refusal_census_warp` `0.11s`, `startup_indirect_translated_indexed_alias_warp` `0.12s`, `startup_indirect_other_refusal_census_warp` `0.10s`, `startup_indirect_translated_indexed_upload_warp` `0.12s`, `startup_indirect_translated_indexed_alias_off_warp` `0.06s`, `startup_compute_dispatch_input_warp` `0.99s`) - `sccache`: 2/10 hits; wall `93.2s` AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-26 10:03:50 +00:00
tedin7 commented 2026-11-26 10:04:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T09:51:32Z.


Review of head f1cf4b46 (20 commits behind main, no conflicts).

Code: indirect_table_buffer now takes a limit argument. The translated draw path uses the D3D12 raw-view limit. The compute path passes 16u << 20 explicitly, so its behavior is unchanged. Address-alias opening stays capped at 16 MiB. The ownership, offset, state and copy provenance checks are untouched. The refusal text differs per limit.

Test: translated_buffer_tail_pixel reads the last DWORD of a view 16 bytes beyond 16 MiB. The shortened-view control must read zero, so a widened or misbased view fails it. The fixture ids and manifest choice stay separate per sample kind.

Checked on Linux: git diff --check, tests/docs_links_check.py, tests/bidi_controls_check.py all pass. CI on the head is green. I did not run a code mutation myself (the fixture is Windows-only). The built-in shortened-view control is the negative control.

This is a source-built draw result. It makes no startup claim, so I found no blocker.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit f1cf4b4665d4a8da2bdc18ea6b713b2444e1d962:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 28.35s (configure 1.84s)
    • Test (ctest --preset dev -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure): 12/12 passed (1.07s: startup_indirect_copy_provenance_off_warp 0.20s, startup_indirect_translated_indexed_warp 0.19s, startup_indirect_copy_provenance_warp 0.20s, startup_indirect_translated_draw_warp 0.23s, startup_indirect_translated_indexed_rect_warp 0.20s, startup_indirect_translated_refusal_census_warp 0.15s, startup_indirect_translated_targets_warp 0.15s, startup_indirect_other_refusal_census_warp 0.14s, startup_indirect_translated_indexed_alias_warp 0.14s, startup_indirect_translated_indexed_upload_warp 0.15s, startup_indirect_translated_indexed_alias_off_warp 0.07s, startup_compute_dispatch_input_warp 0.95s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2): 54.67s (configure 1.84s)
    • Test (ctest --preset release -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure): 12/12 passed (1.10s: startup_indirect_translated_indexed_warp 0.18s, startup_indirect_translated_indexed_rect_warp 0.19s, startup_indirect_translated_draw_warp 0.21s, startup_indirect_copy_provenance_off_warp 0.20s, startup_indirect_copy_provenance_warp 0.23s, startup_indirect_translated_targets_warp 0.11s, startup_indirect_translated_refusal_census_warp 0.11s, startup_indirect_translated_indexed_alias_warp 0.12s, startup_indirect_other_refusal_census_warp 0.10s, startup_indirect_translated_indexed_upload_warp 0.12s, startup_indirect_translated_indexed_alias_off_warp 0.06s, startup_compute_dispatch_input_warp 0.99s)
  • sccache: 2/10 hits; wall 93.2s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7188570250 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2477#issuecomment-7188570250). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T09:51:32Z. --- Review of head `f1cf4b46` (20 commits behind main, no conflicts). Code: `indirect_table_buffer` now takes a `limit` argument. The translated draw path uses the D3D12 raw-view limit. The compute path passes `16u << 20` explicitly, so its behavior is unchanged. Address-alias opening stays capped at 16 MiB. The ownership, offset, state and copy provenance checks are untouched. The refusal text differs per limit. Test: `translated_buffer_tail_pixel` reads the last DWORD of a view 16 bytes beyond 16 MiB. The shortened-view control must read zero, so a widened or misbased view fails it. The fixture ids and manifest choice stay separate per sample kind. Checked on Linux: `git diff --check`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py` all pass. CI on the head is green. I did not run a code mutation myself (the fixture is Windows-only). The built-in shortened-view control is the negative control. This is a source-built draw result. It makes no startup claim, so I found no blocker. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `f1cf4b4665d4a8da2bdc18ea6b713b2444e1d962`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `28.35s` (configure `1.84s`) - Test (`ctest --preset dev -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **12/12 passed** (`1.07s`: `startup_indirect_copy_provenance_off_warp` `0.20s`, `startup_indirect_translated_indexed_warp` `0.19s`, `startup_indirect_copy_provenance_warp` `0.20s`, `startup_indirect_translated_draw_warp` `0.23s`, `startup_indirect_translated_indexed_rect_warp` `0.20s`, `startup_indirect_translated_refusal_census_warp` `0.15s`, `startup_indirect_translated_targets_warp` `0.15s`, `startup_indirect_other_refusal_census_warp` `0.14s`, `startup_indirect_translated_indexed_alias_warp` `0.14s`, `startup_indirect_translated_indexed_upload_warp` `0.15s`, `startup_indirect_translated_indexed_alias_off_warp` `0.07s`, `startup_compute_dispatch_input_warp` `0.95s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_indirect_draw_indexed -- -j 2`): `54.67s` (configure `1.84s`) - Test (`ctest --preset release -R '^(startup_indirect_(translated_(draw|indexed|indexed_upload|indexed_rect|indexed_alias|indexed_alias_off|targets|refusal_census)|copy_provenance(_off)?|other_refusal_census)_warp|startup_compute_dispatch_input_warp)$' --parallel 6 --no-tests=error --output-on-failure`): **12/12 passed** (`1.10s`: `startup_indirect_translated_indexed_warp` `0.18s`, `startup_indirect_translated_indexed_rect_warp` `0.19s`, `startup_indirect_translated_draw_warp` `0.21s`, `startup_indirect_copy_provenance_off_warp` `0.20s`, `startup_indirect_copy_provenance_warp` `0.23s`, `startup_indirect_translated_targets_warp` `0.11s`, `startup_indirect_translated_refusal_census_warp` `0.11s`, `startup_indirect_translated_indexed_alias_warp` `0.12s`, `startup_indirect_other_refusal_census_warp` `0.10s`, `startup_indirect_translated_indexed_upload_warp` `0.12s`, `startup_indirect_translated_indexed_alias_off_warp` `0.06s`, `startup_compute_dispatch_input_warp` `0.99s`) - `sccache`: 2/10 hits; wall `93.2s` 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!2469
No description provided.