Device method 0x218 (and 0x1c8): raw-code compute pipelines — description layout from dumps #7

Open
opened 2026-11-27 13:28:17 +00:00 by BestBlade89 · 1 comment
BestBlade89 commented 2026-11-27 13:28:17 +00:00 (Migrated from github.com)

Imported from realblastex/flamingo. Originally posted by BestBlade89 on 2026-11-27T13:28:17Z.


<html>

Summary

On my runs the title calls device method 0x218 more than 2048 times (and 0x1c8 about 16 times). Both still return E_NOTIMPL in device.rs (unknown_pipeline), so the title goes without those pipelines. I dumped the descriptions with FLAMINGO_DUMP_RAW_PIPELINES and worked out most of the 0x218 layout. It is not a container: it hands over raw GFX10 code plus metadata in a format other than FSSM.

Setup: Windows 11, RX 7800 XT 16 GB (also seen on an RTX 4060 Ti 8 GB), --console series-s, VICTORY_LEVELS_ON_DEMAND=1. Same 29 warnings on every run.

Visible effect (likely, not proven): characters' faces and skin render dark and speckled (blue/purple noise) in cutscenes. The 0x218 programs look like texture post-processing / mip generation (see below), so skin and detail textures may never get finished.

0x218 description: 12 words (0x60 bytes) per pipeline

The title passes a pointer into an array. The 96-word dump of call n holds the descriptions of calls n…n+7, so the stride is 12 words.

word | value (call 1) | meaning -- | -- | -- 0 | 29d9d24e7a0 | root signature (one of our RootSignature objects) 1, 2 | ptr, 0x1c | hardware register block (below) 3, 4 | ptr, 0x14 | [u32 hash, 3, 0, 0, 0] (3 = stage? identical in every call) 5, 6 | ptr, 0x180–0x400 | raw GFX10 machine code 7, 8 | ptr, 0x118–0x1d8 | resource metadata (below) 9, 10 | two pointers | unknown 11 | u64 | pipeline hash

Register block (0x1c bytes)

Identical in all 16 dumped calls except one word:

4005cf00 6c090102 00000000 00080008 00000001 402c0343|402c0345 00000b8a
  • 0x402c0343 / …45: looks like COMPUTE_PGM_RSRC1 (FLOAT_MODE 0xc0, DX10_CLAMP, VGPR granule 3 or 5).
  • 0x00000b8a: looks like COMPUTE_PGM_RSRC2. Decoded with ComputeIo: 5 user SGPRs, TGID x/y/z, thread ids in v0–v1, no LDS, no scratch.
  • 00080008 00000001: thread group 8×8×1.

Code (call 1, hand-decoded)

s_mov_b32 s8, s4 ; s_mov_b32 s9, 0          ; user SGPR 4 = 32-bit descriptor table address
s_load_dwordx4 s[12:15], s[8:9], 0x40       ; sampler at table +0x40
s_load_dwordx8 s[24:31], s[8:9], 0x00       ; texture at table +0x00
image_sample_l ... s[24:31], s[12:15]
image_store ...                              ; 1..4 stores depending on the variant

code= in the warning lists image_sample_l + 1/2/3/4 × image_store, with no exports. It reads one level and writes up to 4, which looks like a mip-chain generator.

Metadata block

Header 0x403, size, … (5 words), then 0x20-byte records. Call 1 (1 output):

41  class 0x401  off 0x00  id 0x003  size 0  flags 0x000b0004   <- table? (low bits 4 = user SGPR 4?)
41  class 0x300  off 0x00  id 0x10a  size 4  flags 0x408        <- SRV texture, table +0
41  class 0x303  off 0x08  id 0x017  size 4  flags 0x408        <- UAV texture, table +8 dwords
41  class 0x302  off 0x10  id 0x01b  size 0  flags 0x404        <- sampler, table +0x10 dwords
42  0  0x00070001  0x10a  1
42  0  0x00070101  0x017  1
42  0  0x000d0201  0x01b  1
43  128-bit hash

Call 2 (2 outputs) adds one 0x41/0x303 record (off 0x10, id 0x18) and one 0x42. The sampler moves to off 0x18. Each output adds a UAV to the table.

The sampler offset in the record (0x10 dwords = 0x40 bytes) matches the s_load_dwordx4 … 0x40 in the code, so off looks like the descriptor's dword offset in the table.

Possible implementation

Build a synthetic FSSM (one Cs record) from these pieces and send it down the normal create_compute → translate path:

  • ComputeIo { rsrc2: word 6 of the register block, threads: [x, y, z] }
  • layout: one RootParam { root: Table, user_data: 4, slot: ? }
  • used: one UsedResource per 0x41 record (0x300 → Srv, 0x303 → Uav, 0x302 → Sampler, table_offset_dwords = off)

The open question is the root slot. The root signature in word 0 keeps its serialized blob (root.rs), so its parameters can be read back with the host deserializer. With a single descriptor table, slot = that parameter.

0x1c8 (graphics, not analysed in depth)

A different layout. The first words are root, then (ptr, len) pairs: 0x184, 0xbc, code 0x200, 0xd0, code 0x200, 0xb0. Two stages, small pixel programs (image_sample + exp, 15–48 instructions).

I can upload the dumps (770 files, 16 calls of each method) if that helps.

</html>
<!-- greyfinch-sync:realblastex/flamingo:issue:6647393061 --> Imported from [realblastex/flamingo](https://github.com/realblastex/flamingo/issues/7). Originally posted by [BestBlade89](https://github.com/BestBlade89) on 2026-11-27T13:28:17Z. --- <html> <body> <!--StartFragment--><h2 dir="ltr">Summary</h2> <p dir="ltr">On my runs the title calls device method <code dir="ltr">0x218</code> more than 2048 times (and <code dir="ltr">0x1c8</code> about 16 times). Both still return <code dir="ltr">E_NOTIMPL</code> in <code dir="ltr">device.rs</code> (<code dir="ltr">unknown_pipeline</code>), so the title goes without those pipelines. I dumped the descriptions with <code dir="ltr">FLAMINGO_DUMP_RAW_PIPELINES</code> and worked out most of the <code dir="ltr">0x218</code> layout. It is <strong>not</strong> a container: it hands over raw GFX10 code plus metadata in a format other than FSSM.</p> <p dir="ltr">Setup: Windows 11, RX 7800 XT 16 GB (also seen on an RTX 4060 Ti 8 GB), <code dir="ltr">--console series-s</code>, <code dir="ltr">VICTORY_LEVELS_ON_DEMAND=1</code>. Same 29 warnings on every run.</p> <p dir="ltr">Visible effect (likely, not proven): characters' faces and skin render dark and speckled (blue/purple noise) in cutscenes. The <code dir="ltr">0x218</code> programs look like texture post-processing / mip generation (see below), so skin and detail textures may never get finished.</p> <h2 dir="ltr">0x218 description: 12 words (0x60 bytes) per pipeline</h2> <p dir="ltr">The title passes a pointer into an array. The 96-word dump of call <em>n</em> holds the descriptions of calls <em>n</em>…<em>n</em>+7, so the stride is 12 words.</p> <div dir="ltr"> word | value (call 1) | meaning -- | -- | -- 0 | 29d9d24e7a0 | root signature (one of our RootSignature objects) 1, 2 | ptr, 0x1c | hardware register block (below) 3, 4 | ptr, 0x14 | [u32 hash, 3, 0, 0, 0] (3 = stage? identical in every call) 5, 6 | ptr, 0x180–0x400 | raw GFX10 machine code 7, 8 | ptr, 0x118–0x1d8 | resource metadata (below) 9, 10 | two pointers | unknown 11 | u64 | pipeline hash </div> <h3 dir="ltr">Register block (0x1c bytes)</h3> <p dir="ltr">Identical in all 16 dumped calls except one word:</p> <div role="group" aria-label="Code" tabindex="0" dir="ltr"><div><div></div></div><div><pre><code style="white-space: pre-wrap;">4005cf00 6c090102 00000000 00080008 00000001 402c0343|402c0345 00000b8a</code></pre></div></div> <ul dir="ltr"> <li><code dir="ltr">0x402c0343</code> / <code dir="ltr">…45</code>: looks like <code dir="ltr">COMPUTE_PGM_RSRC1</code> (FLOAT_MODE <code dir="ltr">0xc0</code>, DX10_CLAMP, VGPR granule 3 or 5).</li> <li><code dir="ltr">0x00000b8a</code>: looks like <code dir="ltr">COMPUTE_PGM_RSRC2</code>. Decoded with <code dir="ltr">ComputeIo</code>: 5 user SGPRs, TGID x/y/z, thread ids in v0–v1, no LDS, no scratch.</li> <li><code dir="ltr">00080008 00000001</code>: thread group 8×8×1.</li> </ul> <h3 dir="ltr">Code (call 1, hand-decoded)</h3> <div role="group" aria-label="Code" tabindex="0" dir="ltr"><div><div></div></div><div><pre><code style="white-space: pre;">s_mov_b32 s8, s4 ; s_mov_b32 s9, 0 ; user SGPR 4 = 32-bit descriptor table address s_load_dwordx4 s[12:15], s[8:9], 0x40 ; sampler at table +0x40 s_load_dwordx8 s[24:31], s[8:9], 0x00 ; texture at table +0x00 image_sample_l ... s[24:31], s[12:15] image_store ... ; 1..4 stores depending on the variant</code></pre></div></div> <p dir="ltr" style=""><code dir="ltr">code=</code> in the warning lists <code dir="ltr">image_sample_l</code> + 1/2/3/4 × <code dir="ltr">image_store</code>, with no exports. It reads one level and writes up to 4, which looks like a mip-chain generator.</p> <h3 dir="ltr" style="">Metadata block</h3> <p dir="ltr" style="">Header <code dir="ltr">0x403, size, …</code> (5 words), then 0x20-byte records. Call 1 (1 output):</p> <div role="group" aria-label="Code" tabindex="0" dir="ltr" style=""><div><div></div></div><div><pre><code style="white-space: pre;">41 class 0x401 off 0x00 id 0x003 size 0 flags 0x000b0004 &lt;- table? (low bits 4 = user SGPR 4?) 41 class 0x300 off 0x00 id 0x10a size 4 flags 0x408 &lt;- SRV texture, table +0 41 class 0x303 off 0x08 id 0x017 size 4 flags 0x408 &lt;- UAV texture, table +8 dwords 41 class 0x302 off 0x10 id 0x01b size 0 flags 0x404 &lt;- sampler, table +0x10 dwords 42 0 0x00070001 0x10a 1 42 0 0x00070101 0x017 1 42 0 0x000d0201 0x01b 1 43 128-bit hash</code></pre></div></div> <p dir="ltr" style="">Call 2 (2 outputs) adds one <code dir="ltr">0x41/0x303</code> record (off <code dir="ltr">0x10</code>, id <code dir="ltr">0x18</code>) and one <code dir="ltr">0x42</code>. The sampler moves to off <code dir="ltr">0x18</code>. Each output adds a UAV to the table.</p> <p dir="ltr" style="">The sampler offset in the record (<code dir="ltr">0x10</code> dwords = <code dir="ltr">0x40</code> bytes) matches the <code dir="ltr">s_load_dwordx4 … 0x40</code> in the code, so <code dir="ltr">off</code> looks like the descriptor's dword offset in the table.</p> <h2 dir="ltr" style="">Possible implementation</h2> <p dir="ltr" style="">Build a synthetic FSSM (one <code dir="ltr">Cs</code> record) from these pieces and send it down the normal <code dir="ltr">create_compute</code> → <code dir="ltr">translate</code> path:</p> <ul dir="ltr" style=""> <li><code dir="ltr">ComputeIo { rsrc2: word 6 of the register block, threads: [x, y, z] }</code></li> <li><code dir="ltr">layout</code>: one <code dir="ltr">RootParam { root: Table, user_data: 4, slot: ? }</code></li> <li><code dir="ltr">used</code>: one <code dir="ltr">UsedResource</code> per <code dir="ltr">0x41</code> record (<code dir="ltr">0x300</code> → Srv, <code dir="ltr">0x303</code> → Uav, <code dir="ltr">0x302</code> → Sampler, <code dir="ltr">table_offset_dwords = off</code>)</li> </ul> <p dir="ltr" style="">The open question is the root slot. The root signature in word 0 keeps its serialized blob (<code dir="ltr">root.rs</code>), so its parameters can be read back with the host deserializer. With a single descriptor table, slot = that parameter.</p> <h2 dir="ltr" style="">0x1c8 (graphics, not analysed in depth)</h2> <p dir="ltr" style="">A different layout. The first words are root, then <code dir="ltr">(ptr, len)</code> pairs: <code dir="ltr">0x184</code>, <code dir="ltr">0xbc</code>, code <code dir="ltr">0x200</code>, <code dir="ltr">0xd0</code>, code <code dir="ltr">0x200</code>, <code dir="ltr">0xb0</code>. Two stages, small pixel programs (<code dir="ltr">image_sample</code> + <code dir="ltr">exp</code>, 15–48 instructions).</p> <p dir="ltr" style="">I can upload the dumps (770 files, 16 calls of each method) if that helps.</p><!--EndFragment--> </body> </html>
realblastex commented 2026-11-29 03:22:57 +00:00 (Migrated from github.com)
Author

Imported from realblastex/flamingo. Originally posted by realblastex on 2026-11-29T03:22:57Z.


Thank you, this is very good work. It matches what our own runs show: the same 29 warnings on every run, 0x218 programs of the mip-chain form (image_sample_l and one to four image_store), a few long ones with buffer stores, and 0x1c8 programs that end in exp.

Building a synthetic container with one compute record and sending it down the normal create_compute and translate path is the approach we would take too. It keeps one translator and one cache. On the root slot: the root signature in word 0 keeps its serialized blob, so reading its parameters back with the host deserializer and taking the one descriptor table, as you suggest, should work. When there is more than one table, the record's user_data (4 in your dumps) can pick the parameter.

Please do not attach the dumps here. They hold the title's own machine code, which the asset policy keeps out of the repository and its issues. The layout you wrote up is what we need. A pull request along these lines would be welcome; its tests should build their descriptions from synthetic data, as the other tests do.

Whether these programs are behind the dark, speckled skin is not proven, as you say. Once they run, the same cutscene before and after will tell.

<!-- greyfinch-sync:realblastex/flamingo:comment:7250013553 --> Imported from [realblastex/flamingo](https://github.com/realblastex/flamingo/issues/7#issuecomment-7250013553). Originally posted by [realblastex](https://github.com/realblastex) on 2026-11-29T03:22:57Z. --- Thank you, this is very good work. It matches what our own runs show: the same 29 warnings on every run, `0x218` programs of the mip-chain form (`image_sample_l` and one to four `image_store`), a few long ones with buffer stores, and `0x1c8` programs that end in `exp`. Building a synthetic container with one compute record and sending it down the normal `create_compute` and translate path is the approach we would take too. It keeps one translator and one cache. On the root slot: the root signature in word 0 keeps its serialized blob, so reading its parameters back with the host deserializer and taking the one descriptor table, as you suggest, should work. When there is more than one table, the record's `user_data` (4 in your dumps) can pick the parameter. Please do not attach the dumps here. They hold the title's own machine code, which the [asset policy](https://github.com/realblastex/flamingo/blob/main/docs/asset-policy.md) keeps out of the repository and its issues. The layout you wrote up is what we need. A pull request along these lines would be welcome; its tests should build their descriptions from synthetic data, as the other tests do. Whether these programs are behind the dark, speckled skin is not proven, as you say. Once they run, the same cutscene before and after will tell.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
realblastex/flamingo#7
No description provided.