Skip to content

startup: clear tables on root change and log dropped root constants - #1744

Merged
R0Y00 merged 3 commits into
R0Y00:mainfrom
tedin7:x2w-frontier-p08-rootsig
Nov 24, 2026
Merged

R0Y00 merged 3 commits into
R0Y00:mainfrom
tedin7:x2w-frontier-p08-rootsig

Conversation

@tedin7

@tedin7 tedin7 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Two gaps around SetGraphicsRootSignature and SetGraphicsRoot32BitConstants in translated draws.

Changes

  • list_graphics_root (slot 34): a root signature different from the current one now also drops the bound descriptor tables (view_tables), as 61a55f6 already does for the root addresses. Setting the same signature again keeps them, so a title that rebinds the same signature does not lose its tables. Root constants on a signature change are handled in startup: record SetGraphicsRoot32BitConstant (slot 38) #1726 and are not repeated here.
  • list_root_constants (slot 40): a call with parameter >= 16 or offset >= 8 is logged as root constants dropped, and one whose count passes the eighth word as root constants truncated, for the first four such calls in the process. Behaviour is unchanged: the same words are stored or dropped as before.
  • New test startup_root_reset_{warp,hardware} (tests/startup_root_reset.cpp, tests/startup_root_reset_check.py): a 1D texture is drawn through a bound table with no change, with the same root signature again (table kept), after a switch to another signature and back (table gone, the shader reads zeros), and after six out-of-range slot 40 calls (table kept, exactly four log lines: three dropped, one truncated).
  • Notes in docs/startup-runtime.md and docs/experiments.md.

Verified (Windows Server 2025 + Linux)

At commit 50df4c2d04472c2c5d412626e833d8c62849ba7a:

  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP):
    • Debug (--preset dev): cmake --build --preset dev --target startup_stream_consumer -- -j 8 (3.53s), ctest --preset dev -R '^(startup_root_reset_warp|startup_root_cbv_warp|startup_mrt_.*_warp|startup_stream_draw_warp|startup_1d_srv_warp|stream_root_srv_warp)$' --parallel 6 --no-tests=error --output-on-failure -> 7/7 passed (6.70s, startup_root_reset_warp 3.41s).
    • Release /O2 (--preset release): cmake --build --preset release --target startup_stream_consumer -- -j 8 (1.15s), ctest --preset release -R '^(startup_root_reset_warp|startup_root_cbv_warp|startup_mrt_.*_warp|startup_stream_draw_warp|startup_1d_srv_warp|stream_root_srv_warp)$' --parallel 6 --no-tests=error --output-on-failure -> 7/7 passed (6.88s, startup_root_reset_warp 3.63s).
    • Mutation 1 (remove view_tables clear in list_graphics_root): startup_root_reset_warp FAILED on switch_root (actual kept texture pixels instead of zeros).
    • Mutation 2 (clear view_tables unconditionally on every list_graphics_root): startup_root_reset_warp FAILED on same_root (actual read zeros instead of texture pixels).
  • Linux: git diff --check, tests/docs_links_check.py, tests/bidi_controls_check.py: pass.
  • git merge-tree against origin/main, #1701, and #1726: 0 conflicts.

AI-assisted; commands listed were executed locally.

@tedin7 tedin7 changed the title startup: drop bound descriptor tables on a root signature change and log dropped root constants startup: clear tables on root change and log dropped root constants Nov 24, 2026
@tedin7
tedin7 marked this pull request as ready for review November 24, 2026 18:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
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-11-24T18:27:01.291031Z 50df4c2 Draft marked ready
ℹ️ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants