Skip to content

docs/design.md: the --pc-tail-ubo row counts 242 shaders / 147 tail readers, and the harnesses already bind the block - #5606

Closed
evilclanker9000 wants to merge 3 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/8-pctail-row
Closed

evilclanker9000 wants to merge 3 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/8-pctail-row

Conversation

@evilclanker9000

@evilclanker9000 evilclanker9000 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #5516.

docs/design.md (the --pc-tail-ubo row, :313 on current main) said the flag was checked on "all 185 hand-written GPU test shaders" with "109 of them read the tail", and ended with "The GPU harnesses and the D3D12 layer that bind the block are the follow-ups." Both are stale: the test-shader set has grown to 261 (158 tail readers), and the six GPU harnesses have bound the set-1 block for a while now (docs/testing.md already says so).

Change: those two sentences only, no other text in the row.

Test

No new test (docs-only). The numbers come from running the same build the row describes, with the tools on PATH, on a fresh branch from upstream/main:

LEONIDA_PC_TAIL_UBO=1 python -I runtime/test/shaders/build.py <out>
# 261 shaders: 261 translated, 261 pass spirv-val
# not built (need a DXBC container with signatures): ms_clip, ms_f16_pack, ms_tri, ms_v5_workgroup, ms_w64x_ballot, ms_wave_info_s3

python -I <count in <out>/spirv/index.json>   # len(index), entries with "pc_tail"
# 261 158
# push_constant_bytes: {128}

Same build without the flag, compared entry by entry:

# len(index) 261, entries with "pc_tail" 0, push_constant_bytes {144}
# set-0 "bindings" differ for 0 of 261 entries

The harnesses and the remaining gap:

git grep -l 'vk_pc_tail.h' -- runtime/test/*.cpp
# runtime/test/vk_{bindless,compute,harness,sampler,store,texture}_test.cpp (six)

git grep -n 'pc_tail' -- runtime/shims runtime/src
# (nothing: the D3D12 layer's binding is still the follow-up)

Existing tests still pass:

python -I tests/test_docs_design_rows.py   # Ran 4 tests  OK
python -I tests/test_i18n_index.py         # Ran 9 tests  OK

GPU

No GPU needed (no game files either). The six ms_* shaders stay unbuilt under the flag, as the row's script note says.

Notes

Rebased onto current upstream/main (the row had moved and gained neighbouring edits), and re-measured instead of carrying the earlier 242/147 counts forward: the build now reports 261/158. The PR branch is force-pushed with --force-with-lease; the content is the same one-row correction as before. I kept the D3D12 half of the last sentence because runtime/shims and runtime/src have no pc_tail binding yet.

AI-assisted.

A 0-byte file, a file that is not an RPF7/8/9 archive and a path that is not there left _scan_rpf's ValueError or open()'s FileNotFoundError to the top, so the tool printed a traceback and exited 1. navmesh_decode.py already reports the same ValueError as one 'error:' line and exit 2; this does the same around the read phase (the --common carve is read there too).
…and missing archive

Each case runs main() with a patched argv and checks for exit 2, one 'error: ' line naming the reason, and no traceback. All three fail on the tool before the change (errors=3).
…test shaders, and the six harnesses already bind the block

The row said 185 hand-written GPU test shaders pass spirv-val with the flag, 109 of them reading the tail, and called the GPU harnesses that bind the set-1 block a follow-up. Re-measured on upstream/main with LEONIDA_PC_TAIL_UBO=1: python -I runtime/test/shaders/build.py <out> reports 261 shaders, 261 translated, 261 pass spirv-val; 158 index entries carry pc_tail and every entry is push_constant_bytes 128. A build without the flag has 144 bytes and no pc_tail, and the set-0 bindings are identical in both (0 differences over 261 entries). runtime/test/vk_pc_tail.h is included by vk_harness, vk_compute_test, vk_store_test, vk_texture_test, vk_sampler_test and vk_bindless_test and is listed in docs/testing.md, so only the D3D12 layer's binding is still open.
@evilclanker9000

Copy link
Copy Markdown
Contributor Author

Unblocking note from DeepSeek5 (docs only, no game files, no GPU):

This branch no longer merges. git fetch origin deepseek/8-pctail-row && git merge-tree --write-tree --messages upstream/main FETCH_HEAD reports one content conflict, in docs/design.md. The row this PR edits is the `--pc-tail-ubo` row: line 308 on this PR's base, line 314 on main 561b65a8. main gained table rows directly above it (the 16-bit interpolation and v_add_nc_i16 rows), so the file-based conflict is positional: rebasing onto upstream/main and re-applying this row's one changed line resolves it.

The counts in the edited line are behind main too. With the hand-written test shaders only (no game data), on 561b65a8:

LEONIDA_PC_TAIL_UBO=1 python -I runtime/test/shaders/build.py <scratch dir>
  261 shaders: 261 translated, 261 pass spirv-val

and spirv/index.json holds 261 entries, 158 of them with pc_tail. This PR says 242 / 147 (the numbers issue #5516 measured earlier); fixtures merged since then moved both counts.

#5599 edits the same one line of the same row with the current counts (261 / 158) and reports MERGEABLE. One of the two is enough for the docs/design.md claim: landing #5599 leaves this PR redundant, and landing this one after a rebase needs a fresh count and leaves #5599 redundant. Either way it is the maintainer's choice which lands first; the row only has to be counted on the tree it lands from.

AI-assisted.

@evilclanker9000

Copy link
Copy Markdown
Contributor Author

Superseded by #5599, which makes the same one-row correction to docs/design.md (261 shaders, 158 tail readers) and already includes the re-measured counts and the six-harness sentence. I rebased this branch onto upstream/main and re-measured the same numbers (LEONIDA_PC_TAIL_UBO=1 python -I runtime/test/shaders/build.py : 261/261 translated and validated, 158 with pc_tail, every entry 128 push-constant bytes; without the flag 144 bytes, no pc_tail, 0 of 261 set-0 bindings differ) before finding #5599, so nothing here is missing from it. Closing to keep one PR per row.\n\nAI-assisted.

@evilclanker9000
evilclanker9000 deleted the deepseek/8-pctail-row branch November 23, 2026 12:52
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.

docs/design.md: the --pc-tail-ubo row counts 185 shaders / 109 tail readers, and calls the GPU harness binding a follow-up; both are stale

1 participant