upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:11:27 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:11:27 -0500
commit84524ba830902b2d65a13120d4ece93baee0f33e (patch)
tree3a08182c841e0ebcd640364bbb6c2abc12389713 /docs
parentadf2f7ade493ba483e28197877fa1efb1b8b51c1 (diff)
parentabe5d5989e538626bc794b107c70452f0783f11a (diff)
Merge pull request #2705 from Ayinaki
Diffstat (limited to 'docs')
-rw-r--r--docs/d3d12_vulkan.md27
1 files changed, 19 insertions, 8 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md
index 80d500daf..a2284a582 100644
--- a/docs/d3d12_vulkan.md
+++ b/docs/d3d12_vulkan.md
@@ -1356,14 +1356,25 @@ in two shapes:
1356| 1 CBV + 2 tables | 2 | 8 | 6 | 4 | 1356| 1 CBV + 2 tables | 2 | 8 | 6 | 4 |
1357 1357
1358The surplus is 2 dwords under the layer's model and 4 under one-per-table, and it is the same for both shapes: the 1358The surplus is 2 dwords under the layer's model and 4 under one-per-table, and it is the same for both shapes: the
1359driver put a fixed block below the parameters. Arithmetic alone therefore does not separate the two models, because 1359driver put a fixed block below the parameters. Arithmetic alone therefore does not separate the two models. The
1360each fits with a reserved block of its own size. What it does settle is that the block sits below the parameters. 1360disassembly does (`tools/rootsig_census.py --disasm`, over the same 29 programs):
1361The corpus census above places the lowest CS pointer at s4, with `const32` reads at s1, s3, s5 and s7. A 4-dword 1361
1362reserved block with one dword per table starts the CS parameters at s4 and reproduces both totals exactly (10 + 4 1362- `s4` is copied into the low half of a pair, the high half zeroed, and passed to `s_load` as the base in 29 of 29;
1363and 4 + 4). The layer's two-dwords-per-table model needs a 2-dword block to reach the same totals, and that puts the 1363 `s5` is in 16. The two declared tables therefore sit at s4 and s5, one dword each, in signature order, and the 13
1364first pointer at s2, which the CS reads contradict. This is consistent with one dword per table behind a 4-dword 1364 programs that never read `s5` are using only the first.
1365reserved prefix, not proof of it: nothing in the package shows which parameter each SGPR holds, and these 29 are all 1365- A 64-bit pair is copied whole from `s6:s7` in 27 of the 29. Five of those also copy from `s8:s9`, `s10:s11` and
1366compute with every parameter visible, so they say nothing about the visibility question below. 1366 `s12:s13`, which matches their four root CBVs at two dwords each. The other two read none of `s6` to `s13`: they
1367 declare four CBVs and never touch them.
1368- 27 read none of `s0` to `s3`. In `_05` the program adds `s0` and `s3` to `s4`, and `_07` multiplies by `s0`, so
1369 the block below the tables is not always dead, but no program here uses one of those dwords as a pointer.
1370
1371That is `USER_SGPR = 4 + 2 per table + 2 per CBV`, which gives the measured 14 and 8, and it is the one-dword-per-
1372table model behind a four-dword prefix. The CS census above agrees: its lowest pointer is s4, where a four-dword
1373block puts the first table, while two dwords per table would put it at s2.
1374
1375Still open: which CBV index lands in which pair. The four pairs do appear in declaration order, but nothing in the
1376package proves that order, and every parameter in these 29 is `D3D12_SHADER_VISIBILITY_ALL`, so they say nothing
1377about the visibility question below.
1367 1378
1368Spill policy: a signature needing more than 32 user SGPRs, or more than the 64-dword D3D12 cost limit, is 1379Spill policy: a signature needing more than 32 user SGPRs, or more than the 64-dword D3D12 cost limit, is
1369refused loudly (`pack` returns the offending parameter) instead of being truncated. The console spills through 1380refused loudly (`pack` returns the offending parameter) instead of being truncated. The console spills through