diff options
| author | milk4sale <53350507+milk4sale@users.noreply.github.com> | 2026-11-24 12:04:07 -0600 |
|---|---|---|
| committer | milk4sale <53350507+milk4sale@users.noreply.github.com> | 2026-11-24 12:11:21 -0600 |
| commit | 60e15c855f73d2ef12cc30ce22c3f68bb0dc81dc (patch) | |
| tree | f6958905548aaad1c0427aaa76a1982ef0114187 /docs/embedded_shaders.md | |
| parent | 3aa975421d470b76da1aa986a91282c59e20d642 (diff) | |
docs: the BVH builder's 52 programs all translate, and pipeline-state streams are implemented (DOC-BVH-BUILDER-52)
docs/d3d12_vulkan.md, docs/embedded_shaders.md and the index row in
docs/README.md said 51 of the 52 XboxBvhBuilder.dll programs translate and
one rule, buffer_store_short, was missing. The rule has been in
tools/rdna2spirv.py since 8f208d09a, and embedded_shaders.md section 7
already recorded 52 of 52 for main 8575d36e.
Measured on main 3aa975421 with a 1.0.2.1 package: 52 containers extracted,
52 translated, 52 pass spirv-val, natively and with --wave64-emulate.
- d3d12_vulkan.md: the eight passages that give the count (sections 4.8 and
7.2, the M6 row, open question 7, the risks list, Appendix A.2). Section
7.2 held the same paragraph twice, the second copy starting mid-sentence;
it is one paragraph again. The Appendix A.2 measurement keeps its numbers
and says what changed since.
- d3d12_vulkan.md section 3.6: pipeline-state streams (CreatePipelineState)
were described as not implemented yet, 50 lines above the section that
documents them; an unknown subobject type is E_INVALIDARG, not a logged
hard error.
- embedded_shaders.md: sections 4, 5 and 7 (the result table, the blocker
tables, "What this changes" and the build step's report line). The dated
measurements of 51 modules stay as they are.
Open question 20's row in d3d12_vulkan.md has the same count and is left
alone: pull request 381 rewrites that line.
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 ed3a254d7..54549416c 100644 --- a/docs/embedded_shaders.md +++ b/docs/embedded_shaders.md | |||
| @@ -140,10 +140,10 @@ that expands to `FSSM` ([fssm_crosscheck.md](fssm_crosscheck.md)). On all 52 con | |||
| 140 | |---|---| | 140 | |---|---| |
| 141 | | `tools/fssm_unpack.py` | **52/52** decompress to a valid `FSSM` blob (716 B to 101,320 B, median 2,200 B) | | 141 | | `tools/fssm_unpack.py` | **52/52** decompress to a valid `FSSM` blob (716 B to 101,320 B, median 2,200 B) | |
| 142 | | `tools/shader_disasm.py --mcpu gfx1013` | **52/52** disassemble; 42 with no invalid word, 10 with invalid words in the code | | 142 | | `tools/shader_disasm.py --mcpu gfx1013` | **52/52** disassemble; 42 with no invalid word, 10 with invalid words in the code | |
| 143 | | `tools/rdna2spirv.py` | **51** translate and pass `spirv-val` (`main` `49475796`) | | 143 | | `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`) | |
| 144 | 144 | ||
| 145 | When this page was first written, 42 translated and 10 stopped at four rules. Three of those rules have landed since | 145 | When this page was first written, 42 translated and 10 stopped at four rules. Those rules have landed since, and so |
| 146 | (`427c1376`, from #1968), and one program still waits on a fifth rule: | 146 | has a fifth that one program then stopped at (`buffer_store_short`, `8f208d09a`): |
| 147 | 147 | ||
| 148 | | module(s) | blocker then | now | | 148 | | module(s) | blocker then | now | |
| 149 | |---|---|---| | 149 | |---|---|---| |
| @@ -151,12 +151,12 @@ When this page was first written, 42 translated and 10 stopped at four rules. Th | |||
| 151 | | `PT_LoadInstances` | `global_atomic_fmin` | translates | | 151 | | `PT_LoadInstances` | `global_atomic_fmin` | translates | |
| 152 | | `Box32Rehydration`, `ReloadTriangles` | `buffer_load_ushort` | translate | | 152 | | `Box32Rehydration`, `ReloadTriangles` | `buffer_load_ushort` | translate | |
| 153 | | `LeafRehydration` | `tbuffer_load_format_x GFX10_FORMAT_8_UINT` | translates | | 153 | | `LeafRehydration` | `tbuffer_load_format_x GFX10_FORMAT_8_UINT` | translates | |
| 154 | | `Box16Rehydration` | `buffer_load_ushort` | stops at `buffer_store_short` (#1864) | | 154 | | `Box16Rehydration` | `buffer_load_ushort`, then `buffer_store_short` | translates | |
| 155 | 155 | ||
| 156 | The disassembly count is unchanged: the same 42 programs have no invalid word, and 10 have invalid words in the | 156 | The disassembly count is unchanged: the same 42 programs have no invalid word, and 10 have invalid words in the |
| 157 | code. All 10 of those translate; `Box16Rehydration` is one of the 42 clean ones. | 157 | code. All 10 of those translate; `Box16Rehydration` is one of the 42 clean ones. |
| 158 | 158 | ||
| 159 | On current `main`, 51 of the 52 programs translate and pass `spirv-val`. The four earlier blockers were | 159 | On current `main`, all 52 programs translate and pass `spirv-val`. The four earlier blockers were |
| 160 | implemented in #1871 and #1968 (`427c1376`): | 160 | implemented in #1871 and #1968 (`427c1376`): |
| 161 | 161 | ||
| 162 | * `tbuffer_load_format_x GFX10_FORMAT_8_UINT` (#1871) unblocked `LeafRehydration`. | 162 | * `tbuffer_load_format_x GFX10_FORMAT_8_UINT` (#1871) unblocked `LeafRehydration`. |
| @@ -164,11 +164,11 @@ implemented in #1871 and #1968 (`427c1376`): | |||
| 164 | * `global_atomic_fmin` (#1968) unblocked `PT_LoadInstances`. | 164 | * `global_atomic_fmin` (#1968) unblocked `PT_LoadInstances`. |
| 165 | * `buffer_load_ushort` (#1968) unblocked `Box32Rehydration`, `ReloadTriangles`, and the load half of `Box16Rehydration`. | 165 | * `buffer_load_ushort` (#1968) unblocked `Box32Rehydration`, `ReloadTriangles`, and the load half of `Box16Rehydration`. |
| 166 | 166 | ||
| 167 | The single remaining untranslated program stops at one rule: | 167 | The last program needed one more rule, which landed in `8f208d09a`: |
| 168 | 168 | ||
| 169 | | module(s) | blocker | | 169 | | module(s) | rule | |
| 170 | |---|---| | 170 | |---|---| |
| 171 | | `Box16Rehydration` | `buffer_store_short` (#1864) | | 171 | | `Box16Rehydration` | `buffer_store_short` | |
| 172 | 172 | ||
| 173 | Reproduction, after `--extract` above: | 173 | Reproduction, after `--extract` above: |
| 174 | 174 | ||
| @@ -182,17 +182,17 @@ python -I tools/rdna2spirv.py <work>/embedded/dxbc/disasm --out <work>/embedded/ | |||
| 182 | 182 | ||
| 183 | ## 5. What this changes | 183 | ## 5. What this changes |
| 184 | 184 | ||
| 185 | * **The RT builder does not need a DXIL path for the console code.** Its programs are RDNA2 `FSSM`, and 51 of | 185 | * **The RT builder does not need a DXIL path for the console code.** Its programs are RDNA2 `FSSM`, and all |
| 186 | 52 already pass `spirv-val` with the translator the project uses for the game's 26,503 shaders. The bitcode in | 186 | 52 pass `spirv-val` with the translator the project uses for the game's 26,503 shaders. The bitcode in |
| 187 | the same container is a second representation (the one the PC-compiler experiment measured); it is not what | 187 | the same container is a second representation (the one the PC-compiler experiment measured); it is not what |
| 188 | the console runtime executes. | 188 | the console runtime executes. |
| 189 | * **The missing rules were small, and only one is left.** `global_atomic_fmax`/`fmin` (6 programs), | 189 | * **The missing rules were small, and none is left.** `global_atomic_fmax`/`fmin` (6 programs), |
| 190 | `buffer_load_ushort` (3) and `tbuffer_load_format_x` with format 8 (1) were ordinary translator rules, not a new | 190 | `buffer_load_ushort` (3), `tbuffer_load_format_x` with format 8 (1) and `buffer_store_short` (1, |
| 191 | compiler backend, and they are on `main`. The one left is `buffer_store_short` (#1864), for `Box16Rehydration`. | 191 | `Box16Rehydration`) were ordinary translator rules, not a new compiler backend, and they are on `main`. |
| 192 | * **The rehydration programs are the ones closest to the shipped data.** `Box16Rehydration`, | 192 | * **The rehydration programs are the ones closest to the shipped data.** `Box16Rehydration`, |
| 193 | `Box32Rehydration` and `LeafRehydration` are exactly the programs that would turn the dehydrated BVH packs | 193 | `Box32Rehydration` and `LeafRehydration` are exactly the programs that would turn the dehydrated BVH packs |
| 194 | into runtime trees ([bvh.md](bvh.md) §3.1). `LeafRehydration` translates since #1871, `Box32Rehydration` | 194 | into runtime trees ([bvh.md](bvh.md) §3.1). `LeafRehydration` translates since #1871, `Box32Rehydration` |
| 195 | translates since #1968 (`427c1376`), and only `Box16Rehydration` awaits #1864 (`buffer_store_short`). | 195 | translates since #1968 (`427c1376`), and `Box16Rehydration` since `buffer_store_short` (`8f208d09a`). |
| 196 | * **What is still open.** None of the 52 has been executed on a GPU; translation and `spirv-val` do not prove the | 196 | * **What is still open.** None of the 52 has been executed on a GPU; translation and `spirv-val` do not prove the |
| 197 | output. Which of them the game actually creates is a call-site question (RT-5). The module-to-pipeline order | 197 | output. Which of them the game actually creates is a call-site question (RT-5). The module-to-pipeline order |
| 198 | above comes from `ILDN`, not from a runtime trace. The `STAT` metadata-only shape is consistent with reflection, | 198 | above comes from `ILDN`, not from a runtime trace. The `STAT` metadata-only shape is consistent with reflection, |
| @@ -272,8 +272,8 @@ The last line also gets `--wave64-emulate` and the fallback flags of the build, | |||
| 272 | * **A program without a rule is reported, not skipped.** There is no skip list. After the translation the step | 272 | * **A program without a rule is reported, not skipped.** There is no skip list. After the translation the step |
| 273 | compares the extraction index with the translation index and logs the counts and the name of every program the | 273 | compares the extraction index with the translation index and logs the counts and the name of every program the |
| 274 | runtime cannot find (no entry with an `fssm_sha256`, which includes an entry whose metadata failed). It logs them | 274 | runtime cannot find (no entry with an `fssm_sha256`, which includes an entry whose metadata failed). It logs them |
| 275 | on every run, also when the step is reused. Today that is one line: 51 of 52, `Box16Rehydration` | 275 | on every run, also when the step is reused. Today it names none: 52 of 52 are published (it named |
| 276 | (`buffer_store_short`, #1864). The other 51 are published. When no program translates the step fails and keeps | 276 | `Box16Rehydration` until `buffer_store_short` was on `main`). When no program translates the step fails and keeps |
| 277 | no index. | 277 | no index. |
| 278 | * **`--max-shared-memory 32768`.** The constructor creates a pipeline for every program and throws at the first | 278 | * **`--max-shared-memory 32768`.** The constructor creates a pipeline for every program and throws at the first |
| 279 | failure, and the runtime refuses a module over the device's `maxComputeSharedMemorySize` (`E_NOTIMPL`, | 279 | failure, and the runtime refuses a module over the device's `maxComputeSharedMemorySize` (`E_NOTIMPL`, |