diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 21:09:27 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 21:09:27 -0500 |
| commit | 7ea226e65b87491b0977f23d6ff693145d64d02b (patch) | |
| tree | 39d3d45cd393db1a896d5e24a559e12257c5ed94 /docs/embedded_shaders.md | |
| parent | 52ef7df72f856e4be441bc2cb274838a17cfce28 (diff) | |
| parent | 0aecc5efab56a77eddf00ad6cefa046d42aaae6c (diff) | |
Merge main (0aecc5efa: #984 and #968) into the #939 merge
main now holds the #984 merge (18a22c1ae) and #968, queue slot 31 as CopyPageMappingsBatchX. Two conflicts: the include list of d3d12_xs_device.cpp (both includes kept) and the call order in xmem_test.cpp (the two page-mapping tests of #968 run after test_physical_pages, after the early return of #939's file-pools mode). The slot 31 dispatch of #968 stays ahead of the presentation routes, so #939's rule for queue slots 30 to 32 on a device that had a presentation handler does not reach it where xmem is linked.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'docs/embedded_shaders.md')
| -rw-r--r-- | docs/embedded_shaders.md | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/docs/embedded_shaders.md b/docs/embedded_shaders.md index 702b57fe5..6ccdbaf41 100644 --- a/docs/embedded_shaders.md +++ b/docs/embedded_shaders.md | |||
| @@ -144,10 +144,10 @@ that expands to `FSSM` ([fssm_crosscheck.md](fssm_crosscheck.md)). On all 52 con | |||
| 144 | |---|---| | 144 | |---|---| |
| 145 | | `tools/fssm_unpack.py` | **52/52** decompress to a valid `FSSM` blob (716 B to 101,320 B, median 2,200 B) | | 145 | | `tools/fssm_unpack.py` | **52/52** decompress to a valid `FSSM` blob (716 B to 101,320 B, median 2,200 B) | |
| 146 | | `tools/shader_disasm.py --mcpu gfx1013` | **52/52** disassemble; 42 with no invalid word, 10 with invalid words in the code | | 146 | | `tools/shader_disasm.py --mcpu gfx1013` | **52/52** disassemble; 42 with no invalid word, 10 with invalid words in the code | |
| 147 | | `tools/rdna2spirv.py` | **51** translate and pass `spirv-val` (`main` `49475796`) | | 147 | | `tools/rdna2spirv.py` | **52/52** translate and pass `spirv-val` (`main` `3aa975421`, natively and with `--wave64-emulate`; 51 at `main` `49475796`, before `buffer_store_short`) | |
| 148 | 148 | ||
| 149 | When this page was first written, 42 translated and 10 stopped at four rules. Three of those rules have landed since | 149 | When this page was first written, 42 translated and 10 stopped at four rules. Those rules have landed since, and so |
| 150 | (`427c1376`, from #1968), and one program still waits on a fifth rule: | 150 | has a fifth that one program then stopped at (`buffer_store_short`, `8f208d09a`): |
| 151 | 151 | ||
| 152 | | module(s) | blocker then | now | | 152 | | module(s) | blocker then | now | |
| 153 | |---|---|---| | 153 | |---|---|---| |
| @@ -155,12 +155,12 @@ When this page was first written, 42 translated and 10 stopped at four rules. Th | |||
| 155 | | `PT_LoadInstances` | `global_atomic_fmin` | translates | | 155 | | `PT_LoadInstances` | `global_atomic_fmin` | translates | |
| 156 | | `Box32Rehydration`, `ReloadTriangles` | `buffer_load_ushort` | translate | | 156 | | `Box32Rehydration`, `ReloadTriangles` | `buffer_load_ushort` | translate | |
| 157 | | `LeafRehydration` | `tbuffer_load_format_x GFX10_FORMAT_8_UINT` | translates | | 157 | | `LeafRehydration` | `tbuffer_load_format_x GFX10_FORMAT_8_UINT` | translates | |
| 158 | | `Box16Rehydration` | `buffer_load_ushort` | stops at `buffer_store_short` (#1864) | | 158 | | `Box16Rehydration` | `buffer_load_ushort`, then `buffer_store_short` | translates | |
| 159 | 159 | ||
| 160 | The disassembly count is unchanged: the same 42 programs have no invalid word, and 10 have invalid words in the | 160 | The disassembly count is unchanged: the same 42 programs have no invalid word, and 10 have invalid words in the |
| 161 | code. All 10 of those translate; `Box16Rehydration` is one of the 42 clean ones. | 161 | code. All 10 of those translate; `Box16Rehydration` is one of the 42 clean ones. |
| 162 | 162 | ||
| 163 | On current `main`, 51 of the 52 programs translate and pass `spirv-val`. The four earlier blockers were | 163 | On current `main`, all 52 programs translate and pass `spirv-val`. The four earlier blockers were |
| 164 | implemented in #1871 and #1968 (`427c1376`): | 164 | implemented in #1871 and #1968 (`427c1376`): |
| 165 | 165 | ||
| 166 | * `tbuffer_load_format_x GFX10_FORMAT_8_UINT` (#1871) unblocked `LeafRehydration`. | 166 | * `tbuffer_load_format_x GFX10_FORMAT_8_UINT` (#1871) unblocked `LeafRehydration`. |
| @@ -168,11 +168,11 @@ implemented in #1871 and #1968 (`427c1376`): | |||
| 168 | * `global_atomic_fmin` (#1968) unblocked `PT_LoadInstances`. | 168 | * `global_atomic_fmin` (#1968) unblocked `PT_LoadInstances`. |
| 169 | * `buffer_load_ushort` (#1968) unblocked `Box32Rehydration`, `ReloadTriangles`, and the load half of `Box16Rehydration`. | 169 | * `buffer_load_ushort` (#1968) unblocked `Box32Rehydration`, `ReloadTriangles`, and the load half of `Box16Rehydration`. |
| 170 | 170 | ||
| 171 | The single remaining untranslated program stops at one rule: | 171 | The last program needed one more rule, which landed in `8f208d09a`: |
| 172 | 172 | ||
| 173 | | module(s) | blocker | | 173 | | module(s) | rule | |
| 174 | |---|---| | 174 | |---|---| |
| 175 | | `Box16Rehydration` | `buffer_store_short` (#1864) | | 175 | | `Box16Rehydration` | `buffer_store_short` | |
| 176 | 176 | ||
| 177 | Reproduction, after `--extract` above: | 177 | Reproduction, after `--extract` above: |
| 178 | 178 | ||
| @@ -186,17 +186,17 @@ python -I tools/rdna2spirv.py <work>/embedded/dxbc/disasm --out <work>/embedded/ | |||
| 186 | 186 | ||
| 187 | ## 5. What this changes | 187 | ## 5. What this changes |
| 188 | 188 | ||
| 189 | * **The RT builder does not need a DXIL path for the console code.** Its programs are RDNA2 `FSSM`, and 51 of | 189 | * **The RT builder does not need a DXIL path for the console code.** Its programs are RDNA2 `FSSM`, and all |
| 190 | 52 already pass `spirv-val` with the translator the project uses for the game's 26,503 shaders. The bitcode in | 190 | 52 pass `spirv-val` with the translator the project uses for the game's 26,503 shaders. The bitcode in |
| 191 | the same container is a second representation (the one the PC-compiler experiment measured); it is not what | 191 | the same container is a second representation (the one the PC-compiler experiment measured); it is not what |
| 192 | the console runtime executes. | 192 | the console runtime executes. |
| 193 | * **The missing rules were small, and only one is left.** `global_atomic_fmax`/`fmin` (6 programs), | 193 | * **The missing rules were small, and none is left.** `global_atomic_fmax`/`fmin` (6 programs), |
| 194 | `buffer_load_ushort` (3) and `tbuffer_load_format_x` with format 8 (1) were ordinary translator rules, not a new | 194 | `buffer_load_ushort` (3), `tbuffer_load_format_x` with format 8 (1) and `buffer_store_short` (1, |
| 195 | compiler backend, and they are on `main`. The one left is `buffer_store_short` (#1864), for `Box16Rehydration`. | 195 | `Box16Rehydration`) were ordinary translator rules, not a new compiler backend, and they are on `main`. |
| 196 | * **The rehydration programs are the ones closest to the shipped data.** `Box16Rehydration`, | 196 | * **The rehydration programs are the ones closest to the shipped data.** `Box16Rehydration`, |
| 197 | `Box32Rehydration` and `LeafRehydration` are exactly the programs that would turn the dehydrated BVH packs | 197 | `Box32Rehydration` and `LeafRehydration` are exactly the programs that would turn the dehydrated BVH packs |
| 198 | into runtime trees ([bvh.md](bvh.md) §3.1). `LeafRehydration` translates since #1871, `Box32Rehydration` | 198 | into runtime trees ([bvh.md](bvh.md) §3.1). `LeafRehydration` translates since #1871, `Box32Rehydration` |
| 199 | translates since #1968 (`427c1376`), and only `Box16Rehydration` awaits #1864 (`buffer_store_short`). | 199 | translates since #1968 (`427c1376`), and `Box16Rehydration` since `buffer_store_short` (`8f208d09a`). |
| 200 | * **What is still open.** None of the 52 has been executed on a GPU; translation and `spirv-val` do not prove the | 200 | * **What is still open.** None of the 52 has been executed on a GPU; translation and `spirv-val` do not prove the |
| 201 | output. Which of them the game actually creates is a call-site question (RT-5). The module-to-pipeline order | 201 | output. Which of them the game actually creates is a call-site question (RT-5). The module-to-pipeline order |
| 202 | above comes from `ILDN`, not from a runtime trace. The `STAT` metadata-only shape is consistent with reflection, | 202 | above comes from `ILDN`, not from a runtime trace. The `STAT` metadata-only shape is consistent with reflection, |
| @@ -276,8 +276,8 @@ The last line also gets `--wave64-emulate` and the fallback flags of the build, | |||
| 276 | * **A program without a rule is reported, not skipped.** There is no skip list. After the translation the step | 276 | * **A program without a rule is reported, not skipped.** There is no skip list. After the translation the step |
| 277 | compares the extraction index with the translation index and logs the counts and the name of every program the | 277 | compares the extraction index with the translation index and logs the counts and the name of every program the |
| 278 | runtime cannot find (no entry with an `fssm_sha256`, which includes an entry whose metadata failed). It logs them | 278 | runtime cannot find (no entry with an `fssm_sha256`, which includes an entry whose metadata failed). It logs them |
| 279 | on every run, also when the step is reused. Today that is one line: 51 of 52, `Box16Rehydration` | 279 | on every run, also when the step is reused. Today it names none: 52 of 52 are published (it named |
| 280 | (`buffer_store_short`, #1864). The other 51 are published. When no program translates the step fails and keeps | 280 | `Box16Rehydration` until `buffer_store_short` was on `main`). When no program translates the step fails and keeps |
| 281 | no index. | 281 | no index. |
| 282 | * **`--max-shared-memory 32768`.** The constructor creates a pipeline for every program and throws at the first | 282 | * **`--max-shared-memory 32768`.** The constructor creates a pipeline for every program and throws at the first |
| 283 | failure, and the runtime refuses a module over the device's `maxComputeSharedMemorySize` (`E_NOTIMPL`, | 283 | failure, and the runtime refuses a module over the device's `maxComputeSharedMemorySize` (`E_NOTIMPL`, |