Repository navigation
Conversation
A TEXH/SAMPH snapshot's same-pass fast path ignored queued uniform writes. Later draws could encode fresh argument blocks yet retain the earlier texture or sampler selection. Compute submissions also share the last render-pass serial, allowing a prior submission's table to survive into a fresh one. Match the submission and pending-write count before reusing the CPU lookup. Read existing inline overlays otherwise, retaining immutable prior GPU tables and preserving identical-table reuse. GPU-produced/copied/filled handles have an independent existing CPU-visibility limitation and are not repaired here. The real argument-encoding/render/compute fixture passes 62 checks in both encoder modes under Metal validation; the exact same fixture fails eight with only the production source restored to b0cb24ee. Six docs tests pass and focused LLVM 23.1.5 analysis has zero new findings against the unchanged baseline. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com>
…or a new submission (PR #2228) htab_gpu kept a table of a uniform buffer's handles while the pass serial, the registrations and the size stayed the same. An inline update deferred in an open pass, a copy or a fill could change the handles in between, and a compute-only submission keeps the last pass's serial, so later draws and dispatches sampled the earlier texture or sampler. A table is now kept only in the same submission and when no write queued since its last look lands on its bytes (htab_written, which scans only the writes since through pend_since). Writes to other uniform blocks, which games make before nearly every draw, keep the table without reading it again; the table log line counts the reads. t_htab_update (from the PR) encodes real draws and dispatches: 67 checks pass with and without the encoder thread under Metal validation; main failed 8, and checking every queued write instead of the overlapping ones fails the write-beside-the-table check. No game run: no local build reads handle tables. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com>
|
Thanks — landed on main as 41acde7, with you as co-author. The diagnosis, the fixture and the submission/queued-write checks are yours. One change: the fast path is now invalidated only by a queued write that overlaps the table's own bytes ( The reference entry moved to docs/reference/shaders.md, next to the other handle-table entries ("A handle table kept past a write to its handles"). The Ocarina of Time note was dropped, since no symptom there is attributed to it. Fixture 67/67 in both encoder modes, gfx test list, docs tests and lint pass. No game was run: no local build reads handle tables. |
…e updates and new submissions (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
…e updates and new submissions (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
…e updates and new submissions (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
What and why
A draw can encode fresh arguments after an inline uniform update yet keep the previous texture/sampler handle table. The TEXH/SAMPH snapshot fast path checked pass, registrations and size but not the queued writes. Compute-only submissions can also share the last render-pass serial and reuse a prior submission's table.
Require the same submission and pending-write count, with no tracking overflow, before taking that fast path. Otherwise the existing inline-update reader reconstructs the handles and compares results. A changed table gets a new immutable GPU buffer; earlier commands retain their table. Equal handles/resource IDs still reuse their buffer.
This is a scoped inline-update/submission fix. GPU-produced, copied or filled handles retain their separately diagnosed CPU-visibility limitation. No shader translation, rendering quality or pacing policy is changed. No frame-rate gain or attribution to OOT's white glow/floor captures is claimed.
Checked
4c574a6f055217ac0b6d5fbeccd1eb22b86dbe90; standalone head4761bd9bc6c0c30fe178cd2f5eec35f9aeb18931.t_htab_update: 62 checks, zero failures, bothDM_NVN_ENC_THREAD=0and1, with Metal validation. Production argument encoding feeds real render and compute submissions. Literal red/green textures and distinct clamp/repeat samplers expose stale selection; the first draw's pixels must remain unchanged. Covers full/partial inline updates, an unrelated-write control, two dispatches and a new compute submission with unchanged render-pass serial.regress.py impact: Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom use affected entry points; 153 profiles lack usage manifests. No multi-game or iOS gameplay sweep. The literal-pixel synthetic oracle validates this narrow resource-selection contract; broader regressions and long play remain unchecked.Docs