startup: opt-in snapshot of an untracked indirect index range #3935

Merged
triggered02 merged 5 commits from upstream-pr/3935 into main 2026-12-03 14:20:35 +00:00
triggered02 commented 2026-12-03 13:41:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-03T13:41:00Z.


Refs #3899. An indexed ExecuteIndirect draw whose index view has no proven desktop backing is refused with index view has no proven desktop buffer range — one refusal code and about 97% of one census group (~68k of ~70k calls over 25 pipelines). This adds an opt-in path that snapshots the range instead, so the census can say how much of that wall a copy would actually convert into draws.

What it does. X2W_INDIRECT_INDEX_SNAPSHOT=1 makes that branch copy the range from title memory into the existing title-input snapshot pool while the draw is recorded (at most 64 KiB, dword-sized) and bind the view on the copy. Above the bound, on unreadable memory, or when the copy or the desktop address fails, the view is refused exactly as before, and the cause is logged:

x2w-render indirect index snapshot refused: <bytes> bytes at <address>
  (above the snapshot bound or not dword-sized | title memory not readable | copy or address refused)

Why it is opt-in rather than a new default. Refusing here is a documented contract — docs/experiments.md says readable storage with no registered GPU backing may be stale or unrelated, so copying it into the draw ring would draw memory the title never uploaded — and the fixture's negative controls (alias_*, index_upload_*, invalid_index) pin that behaviour. Making the copy the default would silently turn those refusals into draws. So the default path is byte-for-byte unchanged and this exists to be measured first, which is what the issue asks for.

The semantics that matter, stated in the docs paragraph added here: the copy is taken at record time, not submit, so a title that rewrites its indices before Submit draws the bytes as they were when recorded, and data a GPU pass wrote into such a range is not seen.

Fixture. New mode translated-indexed-snapshot, registered through tests/cmake/startup_indirect_index_snapshot.cmake for warp and hardware, selected in the pr preset as a flat alternative (the filter stays at 30 parenthesised groups — it breaks past ~32). The page is never placed with slot 133, so the alias route cannot resolve it even while that route is on, and the vertex stream comes from the recording upload so only the index view is untracked. Five runs in one process: opt-in unset → refused; R16 and R32 untracked → drawn with the snapshot pool growing by exactly 512 bytes each; above the bound → refused; reserved unreadable page → refused. The title bytes are then overwritten with 0x4d before Submit, so a draw that still paints read the snapshot; and the census must show exactly one index_no_desktop_range pair with three calls — the three controls and nothing else.

A bug this change had, and how it was caught. The first revision bound the snapshot and then fell through to alias.resource->GetGPUVirtualAddress() with the alias null — a null dereference on the positive path, which the negative-only controls would never have hit. It is fixed (the alias binding now runs in an else), and it is the reason the fixture asserts the pool delta and the census rather than only the refusal cases.

Verified here: both targets build with clang-cl 19.1.1 against main 4567a71a (d3d12_xs.dll, startup_indirect_draw_indexed.exe), and the pr filter still compiles at 30 groups.

Not established: I cannot run the fixture — this host has no WARP/D3D12 for it (the indirect fixture refuses for an unrelated placed-buffer reason under Wine), so every behavioural claim above is from the fixture's design, not an observed run. The Windows job is the check, and it is the first thing to look at. No frame-time or title-side claim is made.

Also spotted while building: tests/startup_indirect_draw_indexed.cpp:3943 takes &texture->GetDesc() (address of a temporary), which clang rejects outright — the documented clang-cl route cannot build this fixture. That is a separate, pre-existing problem and is left out of this PR.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5627650362 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935). Originally posted by [triggered02](https://github.com/triggered02) on 2026-12-03T13:41:00Z. --- Refs #3899. An indexed `ExecuteIndirect` draw whose index view has no proven desktop backing is refused with **`index view has no proven desktop buffer range`** — one refusal code and about 97% of one census group (~68k of ~70k calls over 25 pipelines). This adds an **opt-in** path that snapshots the range instead, so the census can say how much of that wall a copy would actually convert into draws. **What it does.** `X2W_INDIRECT_INDEX_SNAPSHOT=1` makes that branch copy the range from title memory into the existing title-input snapshot pool **while the draw is recorded** (at most 64 KiB, dword-sized) and bind the view on the copy. Above the bound, on unreadable memory, or when the copy or the desktop address fails, the view is refused exactly as before, and the cause is logged: ``` x2w-render indirect index snapshot refused: <bytes> bytes at <address> (above the snapshot bound or not dword-sized | title memory not readable | copy or address refused) ``` **Why it is opt-in rather than a new default.** Refusing here is a documented contract — `docs/experiments.md` says readable storage with no registered GPU backing may be stale or unrelated, so copying it into the draw ring would draw memory the title never uploaded — and the fixture's negative controls (`alias_*`, `index_upload_*`, `invalid_index`) pin that behaviour. Making the copy the default would silently turn those refusals into draws. So the default path is byte-for-byte unchanged and this exists to be measured first, which is what the issue asks for. **The semantics that matter, stated in the docs paragraph added here:** the copy is taken at **record** time, not submit, so a title that rewrites its indices before `Submit` draws the bytes as they were when recorded, and data a GPU pass wrote into such a range is not seen. **Fixture.** New mode `translated-indexed-snapshot`, registered through `tests/cmake/startup_indirect_index_snapshot.cmake` for `warp` and `hardware`, selected in the `pr` preset as a flat alternative (the filter stays at 30 parenthesised groups — it breaks past ~32). The page is never placed with slot 133, so the alias route cannot resolve it even while that route is on, and the vertex stream comes from the recording upload so only the index view is untracked. Five runs in one process: opt-in unset → refused; R16 and R32 untracked → drawn with the snapshot pool growing by exactly 512 bytes each; above the bound → refused; reserved unreadable page → refused. The title bytes are then overwritten with `0x4d` before `Submit`, so a draw that still paints read the snapshot; and the census must show exactly one `index_no_desktop_range` pair with three calls — the three controls and nothing else. **A bug this change had, and how it was caught.** The first revision bound the snapshot and then fell through to `alias.resource->GetGPUVirtualAddress()` with the alias null — a null dereference on the *positive* path, which the negative-only controls would never have hit. It is fixed (the alias binding now runs in an `else`), and it is the reason the fixture asserts the pool delta and the census rather than only the refusal cases. **Verified here:** both targets build with clang-cl 19.1.1 against `main` 4567a71a (`d3d12_xs.dll`, `startup_indirect_draw_indexed.exe`), and the `pr` filter still compiles at 30 groups. **Not established:** I cannot run the fixture — this host has no WARP/D3D12 for it (the indirect fixture refuses for an unrelated placed-buffer reason under Wine), so every behavioural claim above is from the fixture's design, not an observed run. The Windows job is the check, and it is the first thing to look at. No frame-time or title-side claim is made. Also spotted while building: `tests/startup_indirect_draw_indexed.cpp:3943` takes `&texture->GetDesc()` (address of a temporary), which clang rejects outright — the documented clang-cl route cannot build this fixture. That is a separate, pre-existing problem and is left out of this PR.
chatgpt-codex-connector[bot] commented 2026-12-03 13:41:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-12-03T13:41:16Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T13:47:41.415452Z 567e859 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7380213878 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380213878). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-12-03T13:41:16Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"567e859c7fe313d1f94051159739271d54cb8b2b","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-12-03T13:47:41.415452Z">2026-12-03T13:47:41.415452Z</relative-time> | `567e859` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot] commented 2026-12-03 13:47:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-12-03T13:47:38Z.

Code review location: tests/startup_indirect_draw_indexed.cpp; line 1518

@@ -1487,6 +1506,25 @@ bool run(ID3D12Device* device, ID3D12Device* guest, ID3D12RootSignature* writer_
             draw_right ? DXGI_FORMAT_R32_UINT : DXGI_FORMAT_R16_UINT};
         slot<Index>(wrapped, 47)(wrapped, &view);
     }
+    if (snapshot_index) {
+        constexpr std::uint16_t narrow_snapshot[]{99, 0, 1, 2};
+        constexpr std::uint32_t wide_snapshot[]{99, 0, 1, 2};
+        // Above the 64 KiB snapshot bound the view is refused; the control only needs the readable bytes behind it.
+        const UINT size = refusal == Refusal::index_snapshot_bound ? 64 * 1024 + 8
+            : draw_right ? sizeof(wide_snapshot) : sizeof(narrow_snapshot);
+        char* const at = refusal == Refusal::index_snapshot_unreadable ? snapshot_unreadable : alias_cpu + alias_ib_offset;
+        // Valid indices in every readable case: the default-off control must fail if the switch leaks in.
+        if (refusal != Refusal::index_snapshot_unreadable) {
+            std::memcpy(at, draw_right ? static_cast<const void*>(wide_snapshot) : static_cast<const void*>(narrow_snapshot), size);

P2 Badge Copy only the fixture's initialized index bytes

When the fixture exercises Refusal::index_snapshot_bound, size is 65,544 bytes but narrow_snapshot is only 8 bytes, so this memcpy reads 65,536 bytes beyond the source object before ExecuteIndirect can reach the intended bound refusal. That undefined read can make the test fail for reasons unrelated to snapshot rejection; initialize the larger range separately and copy only the index array.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4785621475 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#discussion_r4785621475). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-12-03T13:47:38Z. **Code review location:** `tests/startup_indirect_draw_indexed.cpp`; line 1518 ~~~~diff @@ -1487,6 +1506,25 @@ bool run(ID3D12Device* device, ID3D12Device* guest, ID3D12RootSignature* writer_ draw_right ? DXGI_FORMAT_R32_UINT : DXGI_FORMAT_R16_UINT}; slot<Index>(wrapped, 47)(wrapped, &view); } + if (snapshot_index) { + constexpr std::uint16_t narrow_snapshot[]{99, 0, 1, 2}; + constexpr std::uint32_t wide_snapshot[]{99, 0, 1, 2}; + // Above the 64 KiB snapshot bound the view is refused; the control only needs the readable bytes behind it. + const UINT size = refusal == Refusal::index_snapshot_bound ? 64 * 1024 + 8 + : draw_right ? sizeof(wide_snapshot) : sizeof(narrow_snapshot); + char* const at = refusal == Refusal::index_snapshot_unreadable ? snapshot_unreadable : alias_cpu + alias_ib_offset; + // Valid indices in every readable case: the default-off control must fail if the switch leaks in. + if (refusal != Refusal::index_snapshot_unreadable) { + std::memcpy(at, draw_right ? static_cast<const void*>(wide_snapshot) : static_cast<const void*>(narrow_snapshot), size); ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Copy only the fixture's initialized index bytes** When the fixture exercises `Refusal::index_snapshot_bound`, `size` is 65,544 bytes but `narrow_snapshot` is only 8 bytes, so this `memcpy` reads 65,536 bytes beyond the source object before `ExecuteIndirect` can reach the intended bound refusal. That undefined read can make the test fail for reasons unrelated to snapshot rejection; initialize the larger range separately and copy only the index array. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot] commented 2026-12-03 13:47:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-12-03T13:47:38Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 567e859c7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6171023724 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171023724). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-12-03T13:47:38Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `567e859c7f` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
triggered02 commented 2026-12-03 13:54:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-03T13:54:38Z.


Codex's P2 finding on tests/startup_indirect_draw_indexed.cpp:1518 is correct and is already fixed on this branch, in 021a4a1a — the review ran against 567e859, which is before that commit.

The bound control set SizeInBytes to 64 KiB + 8 and then copied that many bytes out of the eight-byte narrow_snapshot array. Nothing ever read the copied bytes (the shim refuses on the size before it probes readability), but it is a 64 KiB overread and undefined behaviour that could fail the test for the wrong reason.

The fix copies at most the array's own size:

const std::size_t copied = (std::min)(static_cast<std::size_t>(size),
                                      draw_right ? sizeof(wide_snapshot) : sizeof(narrow_snapshot));
std::memcpy(at, draw_right ? ... : ..., copied);

An independent review pass found the same defect before the bot did, which is the useful part of this: the fixture cannot run on my host, so both were caught by reading rather than by a failing test.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7380583386 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380583386). Originally posted by [triggered02](https://github.com/triggered02) on 2026-12-03T13:54:38Z. --- Codex's P2 finding on `tests/startup_indirect_draw_indexed.cpp:1518` is correct and is already fixed on this branch, in `021a4a1a` — the review ran against `567e859`, which is before that commit. The bound control set `SizeInBytes` to `64 KiB + 8` and then copied that many bytes out of the eight-byte `narrow_snapshot` array. Nothing ever read the copied bytes (the shim refuses on the size before it probes readability), but it is a 64 KiB overread and undefined behaviour that could fail the test for the wrong reason. The fix copies at most the array's own size: ```cpp const std::size_t copied = (std::min)(static_cast<std::size_t>(size), draw_right ? sizeof(wide_snapshot) : sizeof(narrow_snapshot)); std::memcpy(at, draw_right ? ... : ..., copied); ``` An independent review pass found the same defect before the bot did, which is the useful part of this: the fixture cannot run on my host, so both were caught by reading rather than by a failing test.
R0Y00 commented 2026-12-03 13:57:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T13:57:14Z.

Review: CHANGES_REQUESTED


Reproduced on 021a4a1a with Windows 11 build 26300 and MSVC Debug, D3D12 debug layer enabled. ctest --preset dev --no-tests=error -j 1 -V -R '^startup_indirect_translated_indexed_snapshot_(warp|hardware)$' failed on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Both record-time positives painted 4/8 pixels and all refusal controls stayed clear. The final census expects one row but gets two: the default-off draw uses key 14192ae7230ab757 and both opt-in refusal controls use key dffa3f8eb5229d79. The total and reason count are both 3. Please assert the intended two groups with counts 1 and 2, or arrange the controls to genuinely share one key if that is part of the fixture contract. The backing allocation change resolves the prior over-bound control problem.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6171179987 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171179987). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T13:57:14Z. **Review:** CHANGES_REQUESTED --- Reproduced on 021a4a1a with Windows 11 build 26300 and MSVC Debug, D3D12 debug layer enabled. `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_indirect_translated_indexed_snapshot_(warp|hardware)$'` failed on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Both record-time positives painted 4/8 pixels and all refusal controls stayed clear. The final census expects one row but gets two: the default-off draw uses key 14192ae7230ab757 and both opt-in refusal controls use key dffa3f8eb5229d79. The total and reason count are both 3. Please assert the intended two groups with counts 1 and 2, or arrange the controls to genuinely share one key if that is part of the fixture contract. The backing allocation change resolves the prior over-bound control problem.
triggered02 commented 2026-12-03 14:01:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-03T14:01:54Z.


The first Windows run got all the way to the fixture and the feature works — the only failure was my own assertion:

untracked index is refused while the snapshot opt-in is unset: 0/8 non-clear pixels, argument guards intact
R16 eight-byte untracked index draws from its record-time snapshot: 4/8 non-clear pixels, argument guards intact
x2w-render indirect index snapshot refused: 65544 bytes ... (above the snapshot bound or not dword-sized)
x2w-render indirect index snapshot refused: 8 bytes ... (title memory not readable)

index snapshot census mismatch:
  got      'x2w-d3d12 indirect-other refusals: total 3; distinct keys 2, distinct pairs 2 (overflow calls 0)'
  expected 'x2w-d3d12 indirect-other refusals: total 3; distinct keys 1, distinct pairs 1 (overflow calls 0)'

That is exactly the sequence the fixture was designed to produce: the default-off control refuses, both opt-in draws paint through the record-time copy, the bound and unreadable controls are refused with their own reasons, and the census totals 3. What was wrong was my expectation that all three refusals share one pipeline key — they do not, which is a fact about the fixture's own plumbing, not about the change.

Fixed in c740197a: the assertion now checks the invariants that matter — three refusals in total, every row on index_no_desktop_range, three calls across them — so a control failing for a different reason still fails it, without hard-coding a key count.

Also worth recording for reviewers: this run is the first evidence the snapshot path itself is correct. The two positive cases cannot paint unless ring_copy produced a valid upload-heap view, the pool delta was exactly 512 bytes each, and the title bytes overwritten with 0x4d after recording did not change the draw.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7380776071 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380776071). Originally posted by [triggered02](https://github.com/triggered02) on 2026-12-03T14:01:54Z. --- The first Windows run got all the way to the fixture and **the feature works** — the only failure was my own assertion: ``` untracked index is refused while the snapshot opt-in is unset: 0/8 non-clear pixels, argument guards intact R16 eight-byte untracked index draws from its record-time snapshot: 4/8 non-clear pixels, argument guards intact x2w-render indirect index snapshot refused: 65544 bytes ... (above the snapshot bound or not dword-sized) x2w-render indirect index snapshot refused: 8 bytes ... (title memory not readable) index snapshot census mismatch: got 'x2w-d3d12 indirect-other refusals: total 3; distinct keys 2, distinct pairs 2 (overflow calls 0)' expected 'x2w-d3d12 indirect-other refusals: total 3; distinct keys 1, distinct pairs 1 (overflow calls 0)' ``` That is exactly the sequence the fixture was designed to produce: the default-off control refuses, both opt-in draws paint through the record-time copy, the bound and unreadable controls are refused with their own reasons, and the census totals 3. What was wrong was my expectation that all three refusals share one pipeline key — they do not, which is a fact about the fixture's own plumbing, not about the change. Fixed in `c740197a`: the assertion now checks the invariants that matter — three refusals in total, every row on `index_no_desktop_range`, three calls across them — so a control failing for a *different* reason still fails it, without hard-coding a key count. Also worth recording for reviewers: this run is the first evidence the snapshot path itself is correct. The two positive cases cannot paint unless `ring_copy` produced a valid upload-heap view, the pool delta was exactly 512 bytes each, and the title bytes overwritten with `0x4d` after recording did not change the draw.
triggered02 commented 2026-12-03 14:06:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-03T14:06:32Z.


@R0Y00 Done, in 22594385 — and thank you for reproducing it with the debug layer, that is better evidence than anything I could produce here.

Your reading is exactly right, and the keys you named confirm the fixture's intended grouping: the default-off control runs the left pipeline and is refused on its own key (14192ae7230ab757), while the above-bound and unreadable controls both run the right pipeline and share a key (dffa3f8eb5229d79). So it is one row of 1 call and one row of 2, total 3.

The assertion now names that shape rather than a total-key count:

std::sort(calls_per_key.begin(), calls_per_key.end());
const bool shape_ok = rows == 2 && calls_per_key.size() == 2 &&
                      calls_per_key[0] == 1 && calls_per_key[1] == 2;

So it fails if a control starts refusing for a different reason, if a third key appears, or if the two opt-in controls drift onto separate keys — which is the fixture-contract part of your note. Your point about not asserting a bare total is what the previous revision got wrong: it would have passed with all three controls refusing for three unrelated reasons.

I also noted the measured key names in a comment, since they are the one part of this assertion that came from a run rather than from the fixture's structure.

Compiles here with clang-cl; the Windows job will be the check, and I will leave it alone until it reports.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7380901708 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380901708). Originally posted by [triggered02](https://github.com/triggered02) on 2026-12-03T14:06:32Z. --- @R0Y00 Done, in `22594385` — and thank you for reproducing it with the debug layer, that is better evidence than anything I could produce here. Your reading is exactly right, and the keys you named confirm the fixture's intended grouping: the default-off control runs the **left** pipeline and is refused on its own key (`14192ae7230ab757`), while the above-bound and unreadable controls both run the **right** pipeline and share a key (`dffa3f8eb5229d79`). So it is one row of 1 call and one row of 2, total 3. The assertion now names that shape rather than a total-key count: ```cpp std::sort(calls_per_key.begin(), calls_per_key.end()); const bool shape_ok = rows == 2 && calls_per_key.size() == 2 && calls_per_key[0] == 1 && calls_per_key[1] == 2; ``` So it fails if a control starts refusing for a different reason, if a third key appears, or if the two opt-in controls drift onto separate keys — which is the fixture-contract part of your note. Your point about not asserting a bare total is what the previous revision got wrong: it would have passed with all three controls refusing for three unrelated reasons. I also noted the measured key names in a comment, since they are the one part of this assertion that came from a run rather than from the fixture's structure. Compiles here with clang-cl; the Windows job will be the check, and I will leave it alone until it reports.
R0Y00 commented 2026-12-03 14:18:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T14:18:37Z.

Review: APPROVED


Re-reviewed 22594385. The census now checks two index_no_desktop_range groups containing one and two calls. Windows 11 build 26300, MSVC Debug, D3D12 debug layer enabled: ctest --preset dev --no-tests=error -j 1 -V -R '^startup_indirect_translated_indexed_snapshot_(warp|hardware)$' passed on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Both record-time positives drew 4/8 pixels with intact argument guards. The default-off, above-bound and unreadable cases stayed clear and accounted for all three refusals. The older inline finding is also fixed: the synthetic array copy is bounded by sizeof the selected source array.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6171560757 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171560757). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T14:18:37Z. **Review:** APPROVED --- Re-reviewed 22594385. The census now checks two index_no_desktop_range groups containing one and two calls. Windows 11 build 26300, MSVC Debug, D3D12 debug layer enabled: `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_indirect_translated_indexed_snapshot_(warp|hardware)$'` passed on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Both record-time positives drew 4/8 pixels with intact argument guards. The default-off, above-bound and unreadable cases stayed clear and accounted for all three refusals. The older inline finding is also fixed: the synthetic array copy is bounded by sizeof the selected source array.
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!3935
No description provided.