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

Manually merged
github merged 5 commits from github-bot/gh-3935 into gh-pr/3935/base 2026-12-03 14:22:55 +00:00 AGit
Owner

@⁠triggered02 on GitHub · 2026-12-03 13:41 UTC · original
triggered02:feat/3899-indirect-index-snapshot → main · +202 −21 · 5 files · 5 commits · merged 2026-12-03 14:20 UTC

Refs #3901. 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.

**@⁠triggered02** on GitHub · 2026-12-03 13:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935) `triggered02:feat/3899-indirect-index-snapshot` → `main` · +202 −21 · 5 files · 5 commits · merged 2026-12-03 14:20 UTC Refs #3901. 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.
An indexed ExecuteIndirect draw whose index view has no proven desktop backing (no
placed buffer owned by the view, no range this list uploaded, no unique alias) is
refused with 'index view has no proven desktop buffer range'. That is one refusal
code and about 97% of one census group (#3899: ~68k of ~70k calls).

This adds X2W_INDIRECT_INDEX_SNAPSHOT, off by default, which copies such a range
from title memory into the title-input snapshot pool while the draw is recorded
(at most 64 KiB, dword-sized) and binds the view on that copy. Above the bound, on
unreadable memory, or when the copy or the desktop address fails, the view is still
refused and the cause is logged.

Deliberately opt-in: refusing is a documented contract (docs/experiments.md: readable
memory with no registered GPU backing may be stale or unrelated, so copying it would
draw memory the title never uploaded) and the fixture's negative controls pin it, so
the default behaviour is byte-for-byte unchanged. The switch exists to measure how
much of that census a copy would turn into draws before anyone changes the default.

The copy is taken at record time, not at submit: a title that rewrites the indices
before Submit draws the bytes as they were at the recording, and data a GPU pass
wrote into such a range is not seen. Both are stated in the documentation added here.

Refs #3899
New mode translated-indexed-snapshot in startup_indirect_draw_indexed, registered
through tests/cmake/startup_indirect_index_snapshot.cmake for warp and hardware, and
selected in the pr preset as a flat alternative (the filter stays at 30 groups).

The fixture page is never placed with slot 133, so the existing-heap 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 (the default is preserved)
  * R16 and R32 untracked views -> drawn, and the snapshot pool grows by exactly
    512 bytes each, which no other consumer of that slot can cause
  * above the 64 KiB bound -> refused
  * reserved, unreadable page -> refused

The stale-copy semantics are pinned too: the title bytes are overwritten with 0x4d
after recording and before Submit, so a draw that still paints read the snapshot.
The refusal census must show exactly one index_no_desktop_range pair with three
calls, which is the three controls and nothing else.

Refs #3899
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 13:42:13 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-12-03 13:41 UTC · original · edited 2026-12-03 13:47 UTC

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.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-12-03 13:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380213878) · edited 2026-12-03 13:47 UTC <!-- 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>
The bound control set SizeInBytes to 64 KiB + 8 to exceed the snapshot bound, then
copied that many bytes out of an eight-byte constexpr array: a 64 KiB overread whose
result is never read (the shim refuses on the size before it probes readability) but
which is undefined behaviour and would read past the stack top under MSVC.

Copy at most the array's own size. The control only needs a size above the bound.

Found by a review pass over this PR; the fixture cannot run here, so it was found by
reading rather than by a failing run.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-12-03 13:47 UTC · original · reviewed

💡 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".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-12-03 13:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171023724) · **reviewed** <!-- 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>
@ -1490,0 +1515,4 @@
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.
// The bound control only needs a size above 64 KiB; it must not copy that many bytes out of an
// eight-byte array, and the shim refuses on the size before it probes readability anyway.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-12-03 13:47 UTC · original

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 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-12-03 13:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#discussion_r4785621475) **<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 -->
Author
Owner

@⁠triggered02 on GitHub · 2026-12-03 13:54 UTC · original

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.

**@⁠triggered02** on GitHub · 2026-12-03 13:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380583386) 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.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 13:57 UTC · original · requested changes

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.

**@⁠R0Y00** on GitHub · 2026-12-03 13:57 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171179987) · **requested changes** 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.
Author
Owner

@⁠triggered02 on GitHub · 2026-12-03 14:01 UTC · original

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** on GitHub · 2026-12-03 14:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380776071) 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.
The first Windows run of startup_indirect_translated_indexed_snapshot_warp failed
only here:

  got      'total 3; distinct keys 2, distinct pairs 2'
  expected 'total 3; distinct keys 1, distinct pairs 1'

The two positive draws and the three controls do not share one pipeline key, so the
exact key count was an assumption about the fixture's own plumbing rather than a
property of the change. Assert what matters instead: three refusals in total, every
row on index_no_desktop_range, and three calls across them — a control that failed
for a different reason still fails this.

Everything else in that run passed, including the feature itself:

  untracked index is refused while the snapshot opt-in is unset: 0/8 non-clear pixels
  R16 eight-byte untracked index draws from its record-time snapshot: 4/8 non-clear pixels

Refs #3899
R0Y00 reproduced this on Windows 11 26300 with MSVC Debug and the D3D12 debug layer:
both record-time positives painted 4/8 pixels and every refusal control stayed
clear, so the feature is right; what was wrong is the assertion.

The fixture records two groups on purpose. The default-off control runs the left
pipeline and is refused alone on its key (14192ae7230ab757 as measured), while the
above-bound and unreadable controls both run the right pipeline and share a key
(dffa3f8eb5229d79). Total 3, reason count 3, one row of 1 call and one of 2.

Assert that shape instead of a total-key count: exactly two rows, all on
index_no_desktop_range, with 1 and 2 calls. A control that starts failing for a
different reason, or two controls drifting onto separate keys, still fails here.

Refs #3899
Author
Owner

@⁠triggered02 on GitHub · 2026-12-03 14:06 UTC · original

@⁠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.

**@⁠triggered02** on GitHub · 2026-12-03 14:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#issuecomment-7380901708) @⁠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.
github-bot changed target branch from main to gh-pr/3935/base 2026-12-03 14:22:44 +00:00
github manually merged commit 2259438580 into gh-pr/3935/base 2026-12-03 14:22:55 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 14:18 UTC · original · approved these changes

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.

**@⁠R0Y00** on GitHub · 2026-12-03 14:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3935#pullrequestreview-6171560757) · **approved these changes** 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.