shader: trace the first unresolved pixel constant-buffer read #536

Manually merged
github merged 1 commit from gh-pr/536/head into gh-pr/536/base 2026-11-26 21:59:43 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-22 10:03 UTC · original
R0Y00:codex/ps-cbuffer-reads → main · +346 −9 · 6 files · 1 commits · merged 2026-11-22 10:11 UTC

Change

Follow up #527 by grouping the first-profile unresolved constant-buffer records. The optional audit reports the entry pointer and descriptor displacement, first completed read, and the next full-PS rejection with slot zero bound. A source-built fixture exposes the four captured words as D32 depth stripes. A physical b0/b1 swap tests which resource supplies the words.

Verification

Feature commit 41db14c, translator base c849f7a. On Windows 11 build 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, both passed the five draw cases. The stale reference rejected all 1,024 pixels after the swap. The new reference matched all 1,024. Zero capability skips.

cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^pixel_cb_read_' -V
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py

Both CTests and both repository checks passed. To reproduce the archive classification on a local copy with LLVM 15:

python3 -B tools/shader_profile_audit.py "$ARCHIVE" --llvm libLLVM-15.so.1 --cb-reads --source-dir out/cb-scan > out/cb-counts.json

Results

The original 2,927 records split across entry tables s8, s9 and s10. The most frequent location was s9 + 0 (565 records). In 529 of these the four-word descriptor supplied four data words at bytes 16–31. The desktop b0 assignment is explicit. The original register space cannot be deduced from that assignment.

Zero complete shaders graduated from that group. The current baseline independently adds two explicit-LOD PS over #527, taking verified full records from 863 to 865. See docs/experiments.md for the attribution, evidence reuse and per-stage totals. Only aggregate measurements and source-built fixture code are included. AI-assisted.

The post-change full scan matched the baseline on all 988 accepted profile/container files, including source bytes. In the 565-record group the existing s9/offset-zero profile reports 530 first stops at v_cvt_u32_f32_e32, 29 at another descriptor displacement, three unresolved constant bindings and three unbound texture displacements. The separately emitted access probe matched the synthetic fixture exactly and passed both hardware runs using the command in the experiment. The two runs used the physical adapter and WARP, respectively.

**@⁠R0Y00** on GitHub · 2026-11-22 10:03 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/536) `R0Y00:codex/ps-cbuffer-reads` → `main` · +346 −9 · 6 files · 1 commits · merged 2026-11-22 10:11 UTC ## Change Follow up #527 by grouping the first-profile unresolved constant-buffer records. The optional audit reports the entry pointer and descriptor displacement, first completed read, and the next full-PS rejection with slot zero bound. A source-built fixture exposes the four captured words as D32 depth stripes. A physical b0/b1 swap tests which resource supplies the words. ## Verification Feature commit 41db14c, translator base c849f7a. On Windows 11 build 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, both passed the five draw cases. The stale reference rejected all 1,024 pixels after the swap. The new reference matched all 1,024. Zero capability skips. ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^pixel_cb_read_' -V python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py ``` Both CTests and both repository checks passed. To reproduce the archive classification on a local copy with LLVM 15: ```sh python3 -B tools/shader_profile_audit.py "$ARCHIVE" --llvm libLLVM-15.so.1 --cb-reads --source-dir out/cb-scan > out/cb-counts.json ``` ## Results The original 2,927 records split across entry tables s8, s9 and s10. The most frequent location was s9 + 0 (565 records). In 529 of these the four-word descriptor supplied four data words at bytes 16–31. The desktop b0 assignment is explicit. The original register space cannot be deduced from that assignment. Zero complete shaders graduated from that group. The current baseline independently adds two explicit-LOD PS over #527, taking verified full records from 863 to 865. See docs/experiments.md for the attribution, evidence reuse and per-stage totals. Only aggregate measurements and source-built fixture code are included. AI-assisted. The post-change full scan matched the baseline on all 988 accepted profile/container files, including source bytes. In the 565-record group the existing s9/offset-zero profile reports 530 first stops at `v_cvt_u32_f32_e32`, 29 at another descriptor displacement, three unresolved constant bindings and three unbound texture displacements. The separately emitted access probe matched the synthetic fixture exactly and passed both hardware runs using the command in the experiment. The two runs used the physical adapter and WARP, respectively.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:59:41 +00:00
github manually merged commit 41db14cace into gh-pr/536/base 2026-11-26 21:59:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.