Repository navigation
d3d12_xs: slot 57 DeserializeGraphicsPipelineStateX, fspx_gfx index, and pipeline blob input layout - #8890
d3d12_xs: slot 57 DeserializeGraphicsPipelineStateX, fspx_gfx index, and pipeline blob input layout#8890RipcuBAN wants to merge 1 commit into
Conversation
…and pipeline blob input layout
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Verified on Windows 11.
- Critical boot progress fix for retail graphics PSO deserialization in
untime/shims/d3d12_xs_device.cpp:- Accurately decodes 13-qword \XboxNativeGraphicsPipelineStateDesc\ for \ID3D12Device\ slot 57 (\DeserializeGraphicsPipelineStateX).
- Correctly pairs Stage 2 (pixel shader) and Stage 4 (vertex shader) against measured boot PSOs (8916, 8917, 12511), looking up binaries via \sha256\ in <shaders>/fspx_gfx/index.json.
- Parses 188-byte pipeline input layout safely with bounds validation, guarding against truncated final descriptors.
- Non-intrusive logging for unconfirmed state blob offsets without inventing state assumptions.
- \compileall, \git diff --check, and clean-room checks pass.
LGTM!
|
Reproduced a real test failure on head Defect
Root cause
e.spv_file = prefix + spv->string;(which ps_entry->spv_file == "9e5ffd2c6c521c03_libps_00842.spv"
vs_entry->spv_file == "160fbe4368fb1a63_libvs_00843.spv"Steps to reproduce
AI-assisted. |
|
Offline cache coverage check on f1ab75a, before a runtime comparison. Our existing translated work folder has 26,566 root entries, a compute-only library, and no fspx_gfx/index.json. For the first three boot graphics records, none of the five distinct stage/program pairs matched a same-stage root fssm_sha256 using either the whole native program or its extracted instruction range. Across all 18,838 distinct graphics stage/program pairs, both exact-match counts were zero. These hashes cover different representations, so this only rules out direct rekeying by those two byte ranges. Does your local fspx_gfx producer also resolve the source graphics interface, and is there a reproducible command for producing the index from the player's work folder? No runtime or frame result from this comparison. AI-assisted. |
|
checked: Wine 11.22 / RTX 5070 Ti / NVIDIA 620.73.04, offline. base: dd44a4b53 boot integration with #7685, #7448, #8591, #7880, #8458 and #8763, plus adapted runtime hunks from f1ab75a. shader_library CTest passes. The full private graphics catalog contains 16,684 SPIR-V-validated modules from 18,837 graphics programs attempted. With original #8890 parsing and the five modules for the initial checks, one PSO that had translated stages reached the device but returned E_INVALIDARG for an invalid vertex attribute format. With the parser from #8754 wired to the same runtime path and the full catalog, all 10,241 slot-57 calls in that retail run reached CreateGraphicsPipelineState and returned S_OK. No missing-stage or invalid-layout message was emitted. The title still presented black at both the 45 s and 95 s screen samples. This measures PSO creation and does not validate the guessed fixed-function state or explain the remaining black frames. AI-assisted. No game files, blobs, identifiers, images or trace lines attached. |
|
Follow-up on the first three boot graphics records: each of their five stage records resolves to exactly one source container using the library stage digest and the carved container HASH. With those source interfaces beside the local disassembly, the translator at 867d922 produced 3 VS and 2 PS modules, all five passing spirv-val. Each generated fspx_code_sha256 matches the full native program bytes independently. This gives a five-entry private fspx_gfx index for a bounded runtime comparison. Pipeline creation and presented pixels remain unmeasured with that index. AI-assisted. |
|
I'd like to test this on Linux + Wine 11.21 with a GTX 1650 Mobile (4 GB, NVIDIA, 32-wide subgroups only), on One question before I build: how do you generate Once I can build it, I'll post: slot-57 calls served and refused, whether the first draws appear, and how far the boot gets, 2 runs each with and without this PR. AI-assisted. No game data. |
Only the PR's own commit is applied (its branch also carries 49 newer main commits, left out). Slot 57 handler and its dispatch added beside slots 17-24 and the lease/initial-state code; in the Vulkan layer the new FSSM/FSPX lookup keeps ItsNotRexed#7417's stub_or on both 'no translated shader' paths. device_proxy_test: the fspx_gfx spv filename check expects the folder prefix the loader adds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@gkissel For the five-module Windows check, I used the program bytes and code_range from tools/shader_library.py, matched each stage digest via carve_digests on the dxbc work folder, and put the matching source .dxbc beside disasm/ under the same stem. These are the operations of |
|
Thanks @kacper-serewis, that is what I needed. I will build AI-assisted. |
|
Windows offline retail comparison, RTX 5070 616.56, MSVC 14.50. Private boot stack at 4ecae894d plus its recorded local changes and #8890 f1ab75a. Each measured run issued 25,450 slot-57 calls. On the same instrumented executable the empty graphics index served 0 calls; adding only the five verified modules served 4. With the same five modules and #8754 at 4a04398 wired into the runtime handler, 5 calls returned S_OK. The remainder returned E_INVALIDARG in each run. Full swapchain RGB readbacks were black in all 539, 375 and 337 images respectively. One additional launch stopped before slot 57 and was excluded from this comparison. All reached runs ended at a breakpoint within the 75 s bound. These are five-module results; the full-catalog Wine run above measures a different configuration. One synthetic discrepancy on my integration: device_proxy_test fails its two custom-filename comparisons because spv_file contains the fspx_gfx/ prefix while the test expects a bare filename. Both forms can be checked independently via a real module read. AI-assisted. |
|
Checked the bare-program code-base path on A bare graphics stage with A hand-written pixel shader using The bare graphics path needs to retain the matching native program bytes for that upload, as the compute path does. The same synthetic shader would make a regression fixture for creating a PSO and reading back its embedded constant. AI-assisted. Synthetic input only. |
|
For the state blob (pair 0), which this PR records but doesn't turn into PSO state: #8507 decodes it.
One measurement that supports keying by bytes (Windows 11, RTX 5080,
That's the same PS-first order you measured on records 8916/8917/12511. So besides the program hashes, a handler can also find the exact record, and with it the decoded blend/depth state, from the state blob's bytes. There are 5,680 distinct state blobs. AI-assisted (Claude Code). |
|
Windows retail integration result for
The local index used the normal translator output filenames, keyed by |
|
Coverage detail while building the full catalog on Windows: 12,062 of the 25,471 graphics library records reference a mesh program (10,726 MS+PS and 1,336 MS only). At f1ab75a the stage lookup can return ms, but the slot-57 handler assigns VS, PS or GS only; a resolved ms takes the same E_INVALIDARG path as a missing stage. This is a static library count, not the number of mesh records reached on boot. Separating known-but-unsupported MS from lookup misses in the counters would make full-cache results easier to interpret. AI-assisted. |
|
Measured on Windows/RTX 5070 with the corrected #8754 input parser and five-module graphics cache: two independent runs each returned 5 successes, 24,109 stage-lookup misses and 1,336 failures from PC CreateGraphicsPipelineState. In the second run every one of those 1,336 failures had zero VS, PS and GS bytecode lengths in the outgoing PC descriptor. The number equals the archive's mesh-only record count, but the counters did not establish record identity. In particular an empty outgoing descriptor can fail at PC creation without the proxy's unknown-stage branch ever firing. AI-assisted; aggregates only. |
…ception context Adapted slot 57 from upstream PR ItsNotRexed#8890 by RipcuBAN. Measure and decode the length-prefixed input layout, build the graphics library, and diagnose allocation failures locally.
|
The 1,336 empty PC descriptors are now attributed to mesh-only records on this Windows run. I joined the runtime state blob and input-layout blob to the corresponding archive fields by the pair of content hashes, keeping the keys local. Across all 25,471 graphics records, records sharing such a key always had the same stage set. All 1,336 empty-PC-descriptor failures matched MS-only, zero unmatched or ambiguous. The proxy reads two program pairs, and neither supplied a VS, PS or GS on these failures. This identifies a missing mesh path independently of graphics cache size; it does not establish the location of mesh bytecode in the runtime descriptor. AI-assisted. |
|
Test bug at Also, when this lands with #7529, the second folder loop (the one that returns AI-assisted test run. |
|
CPU-only parser review of #8890 at The synthetic comparison exposes three integration issues:
Wiring #8754 needs to honor parsing failure and copy all six numeric fields, including the per-instance class and step rate. Both parsers own their semantic strings after input storage is released; the descriptor and string vectors stay alive through the synchronous backend call. Reproduction input, entirely synthetic: using Bytes = std::vector<std::uint8_t>;
void append_u32(Bytes& bytes, std::uint32_t value) {
for (unsigned shift = 0; shift < 32; shift += 8)
bytes.push_back(static_cast<std::uint8_t>(value >> shift));
}
void append_element(Bytes& bytes, std::string_view name,
std::initializer_list<std::uint32_t> fields) {
append_u32(bytes, static_cast<std::uint32_t>(name.size() + 1));
bytes.insert(bytes.end(), name.begin(), name.end());
bytes.push_back(0);
for (auto value : fields) append_u32(bytes, value);
}
Bytes bytes(80, 0);
bytes[76] = 2;
append_element(bytes, "ATTR", {3, 16, 2, 28, 0, 0});
append_element(bytes, "CUSTOM_0", {7, 41, 5, 0xffffffffu, 1, 3});
bytes.resize((bytes.size() + 3) & ~std::size_t{3});
unsigned old_accepted = 0, strict_accepted = 0;
for (std::size_t cut = 0; cut < bytes.size(); ++cut) {
std::vector<rt::d3d12_xs::XboxPipelineInputElement> partial;
if (rt::d3d12_xs::parse_xbox_pipeline_blob_input_layout(
bytes.data(), cut, partial))
++old_accepted;
if (leonida::parse_slot57_input_layout(std::span(bytes).first(cut)))
++strict_accepted;
}
// Observed: bytes.size() == 152, old_accepted == 68, strict_accepted == 0.Eight stock CPU gates also passed: shader-library, slot57-input-layout, and the six proxy-mock modes present at these heads. No GPU, WARP, title execution, or full device-proxy fixture was run for this review. No game data is included. |
|
Thanks for measuring the call site: that the call passes
Smaller points:
An implementation that reads all of the above is on a public branch, free to take. @ruvenesh, since the handler is yours on the coordination issue:
Tests (RTX 4090, MSVC RelWithDebInfo):
The branch sits on my local integration of boot-chain PRs, so only those three commits are the change. I'm not opening a competing PR; please take whatever helps. AI-assisted (Claude Code). |
|
Windows offline retail full-library comparison, RTX 5070 616.56. Translated and spirv-val validated 14,159 of 18,837 native graphics programs at 867d922. The catalog completely covers 19,328 of 25,471 graphics records. With #8890 f1ab75a + #8754 4a04398 on the same private stack and executable as my five-module comparison, slot 57 succeeded 12,566/25,450 times (five-module result: 5). All 276 full swapchain readbacks were black. This run later ended with a host access violation. Separate diagnostic with the same catalog: the archive state/layout digest pair uniquely identified the mesh program for every mesh-containing record. Submitting that archived program through the existing PC mesh PSO stream produced 6,647 additional S_OK returns, for 19,213/25,450 slot-57 successes. The diagnostic also returned 498 E_INVALIDARG and 95 E_OUTOFMEMORY on mesh submissions. Remaining first failures overall: 5,624 proxy stage lookup misses and 613 PC creation failures. All 465 swapchain readbacks were black. This tests archive-based reconstruction using existing fixed-function defaults; it does not establish the runtime mesh descriptor layout or correct per-draw state. AI-assisted. No game data attached. |
|
Clean-room static ABI finding answering @kacper-serewis's question about where mesh bytecode sits in the slot-57 runtime descriptor (plus one no-game-data policy heads-up): 1. Full slot-57 descriptor size is
|
| Desc offset | Size | Contents | Archive slot (docs/shader_library.md §2) |
|---|---|---|---|
+0x00 |
8 | ID3D12RootSignature* |
populated per call |
+0x08, +0x10 |
16 | (state_blob, state_blob_size) |
state blob index |
+0x18, +0x20 |
16 | (pipeline_blob, pipeline_blob_size) |
pipeline / input-layout blob index |
+0x28..+0x47 |
32 | Stage 0: (prog, prog_size, stage_blob, stage_blob_size) |
slot 0 (PS) |
+0x48..+0x67 |
32 | Stage 1: (prog, prog_size, stage_blob, stage_blob_size) |
slot 1 (VS) |
+0x68..+0x87 |
32 | Stage 2: (prog, prog_size, stage_blob, stage_blob_size) |
slot 2 (MS — mesh shader) |
+0x88..+0xA7 |
32 | Stage 3: (prog, prog_size, stage_blob, stage_blob_size) |
slot 3 (unused in archive) |
+0xA8..+0xC7 |
32 | Stage 4: (prog, prog_size, stage_blob, stage_blob_size) |
slot 4 (unused in archive) |
+0xC8..+0xE7 |
32 | Stage 5: (prog, prog_size, stage_blob, stage_blob_size) |
slot 5 (unused in archive) |
+0xE8..+0x107 |
32 | Stage 6: (prog, prog_size, stage_blob, stage_blob_size) |
slot 6 (2 records) |
That directly explains @kacper-serewis's 1,336 empty outgoing descriptors on MS-only records (and missing MS on the 10,726 MS+PS records): XboxNativeGraphicsPipelineStateDesc currently stops at +0x60 (stages 0 and 1 = PS and VS), so stage 2 (+0x68 / +0x70 code, +0x78 / +0x80 stage blob) is never read. Extending the struct to 0x108 bytes with StageSlot stages[7] at +0x28 gives direct access to the mesh program at stages[2] (and stages[6] for the 2 slot-6 records).
2. Clean-room / no-game-data heads-up in docs/fspx.md
The added docs/fspx.md section currently includes an exact executable RVA and per-record checksums/SHA-256 prefixes from the retail archive. Dropping those before merge (keeping only struct offsets, counts, and sizes, as in docs/shader_library.md and #8273) will keep the PR compliant with the repository's no-game-data policy.
(Clean-room static ABI inspection only — counts, sizes, and struct offsets; no game bytes/addresses/hashes. No build executed here.)
|
Draw attribution on the full-cache RTX 5070 run: joined the render target at each recorded draw to the actual PresentX source resource and the pipeline's selected modules. All 325 draws targeting a presented resource used the same VS/PS pair from fspx_gfx. The other 651 recorded draws used two VS/PS pairs from the root shader index. All 327 complete GPU readbacks were black. The final PS metadata has three bindings. This shows a translated graphics-library pair is actually used on the presentation target on this stack. It does not yet identify what produced black at the fragment stage. AI-assisted; aggregate counts only. |
|
Follow-up with a full boot's worth of calls (Windows 11, RTX 5080, A probe logged the SHA-256 of each of the six pairs for 10,138 slot-57 calls. That is everything this run reached before its stop, a 2D A8 render target at allocation-info slot 25, which is not related to slot 57. Correlated with the pipeline library:
So a handler keyed by the program hashes (this PR) or by the state blob's hash (5,680 distinct, #8507 decodes them) covers every slot-57 call seen so far. What it serves still depends on the library's VS/PS programs being translated: 1,340 of 1,343 VS and 7,871 of 9,996 PS pass AI-assisted (Claude Code). |
…px_gfx for slot 57 Completes the WIP commit before it. The executable creates its graphics pipelines with Xbox device slot 57 (DeserializeGraphicsPipelineStateX, ItsNotRexed#8890) and passes each record's programs as bare kind-6 bytes; the runtime looks them up by sha256(program bytes) in <shaders>/fspx_gfx/index.json, which nothing generated. - make_game.py's shaders stage gets library_graphics_shaders() after ItsNotRexed#7529's compute step: shader_library.py --stages ps,vs,ms --disasm --carve into <work>/shaders/library_gfx, then rdna2spirv.py with one --shard per job (translate()) into <work>/shaders/spirv/fspx_gfx, with the stage's --wave64-emulate and fallback flags. - Each index entry keeps stage and fspx_code_sha256 (the program's table bytes, what slot 57 passes) and gets "spv", which ShaderLibrary reads under the folder prefix as fspx_gfx/<name>.spv. No fspx_state_sha256: slot 57 passes no kind 0, so two programs with the same bytes and different modules fail the step. - The carve is required (pixel and mesh programs need their source container's signatures). The step reruns whole when shaders.rpf, the tools, llvm-mc, the wave64 mode, the flags or the stages change (fspx_gfx_build.json, written last), and prints the translated count per stage on every run. Tests: tests/test_library_gfx_shaders_stage.py (tool calls, index format, reuse, invalidation, stale outputs and shard plan, empty result, key clash, and the code key on a hand-built library through the real shader_library.py). Measured on the 1.0.2.1 package: 14,159 of 18,837 programs translate (docs/shader_library.md). AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Result on Linux + Wine 11.21, GTX 1650 Mobile 4 GB (NVIDIA, 32-wide subgroups), clang-cl + xwin build. Base: Building
Boot, 180 s:
Some slot-57 calls still fail after the lookup succeeds ( Wave64 note from the translator for the first 950 of them on 32-wide subgroups: tier A 364, tier B 4, tier C 533 (not exact on NVIDIA). AI-assisted. No game data: counts, sizes and API names only. |
|
A data point for that split, from my Wine run above: my temporary miss log sits in the same AI-assisted. Counts only. |
|
Narrowed the Windows full-catalog black-frame measurement to raster coverage. A validated private diagnostic fragment module wrote distinct opaque colors on its normal-return and discard paths. Verified the exact module digest at runtime on the PSO bound to the PresentX source. GPU occlusion queries: 0/7 sampled draws to the presentation resource covered samples, versus 17/17 sampled offscreen draws. The six sampled presentation draw-state records used rectangle topology, 3 vertices, a full-target viewport/scissor, and no depth attachment. Disabling depth/stencil on that PSO alone still gave 0/7; enabling the existing descriptor table copy for its FSPX vertex program alone also gave 0/7. Readbacks remained black. This explains why fragment texture-value probes cannot diagnose the color yet on this build. AI-assisted, no game data. |
|
Two findings from running this with the rest of the boot chain (#7240, #7066, #7516, #7201, #8517, #8869) on a retail boot, RTX 4080 SUPER, driver 617.42. Outcomes only.
AI-assisted (Claude Code). |
|
Tested
AI-assisted (Claude Code). |
|
Update to my comment above: the
One more finding in this PR: in slot 57's FSPX branch in Take whatever helps; we've stopped active work. AI-assisted (Claude Code). |
|
Restored raster coverage with the original FSPX vertex and pixel modules on Windows/RTX 5070. The presentation VS performs its own vertex fetch through a buffer descriptor loaded via s[0:1]; the transform/resource table is separate at s8. For this bounded three-vertex draw I copied the three records from the title's bound, CPU-mapped IA view (24-byte stride) into the shader arena, built a strided buffer descriptor, supplied its arena offset at s[0:1], and kept the transform-table copy at s8. The descriptor was bound on 473 draws. GPU queries on the presentation PSO went from 0/7 covered with the transform table alone to 7/7 with both. All 474 swapchain readbacks remained black. Independent known-position/diagnostic-fragment controls produced a solid diagnostic color, and known positions with the original fragment shader still produced black in 442 readbacks. These isolate a vertex-input issue and leave the fragment inputs/output open. The local fetch test is specific to this measured draw, not a general ABI implementation. AI-assisted, aggregate counts only. |
|
Followed the final PS sample after restoring vertex fetch on the RTX 5070. In a run with the original vertex and pixel modules, all 403 observed presentation texture descriptors decoded, resolved to a registered bindless image, and identified one live resource. It was a slot-133 offscreen render target: two other PSOs recorded 807 draws into that resource, which was separate from the presented surface. All 403 swapchain readbacks were black. In isolated PS probes keeping the title VS, forwarding either interpolated input produced nonuniform diagnostic pixels (307 and 332 readbacks); forwarding the floating-point texture sample produced 0 nonblack in 331, with 7/7 presentation draws covered. Next measured question is what the two offscreen producers write. AI-assisted; aggregate counts only. |
|
Independent Windows 11 / RTX 5070 Ti / 621.24 run, current rt5-integration 2bd3841 with the measured input-layout decoder from #8754 and existing format/presentation fixes: native census found 1,266 distinct program hashes across 10,241 slot-57 calls. The initial five-module cache served 5 calls; 10,236 failed. All 46 PresentX calls succeeded and all eleven swapchain samples were black. I have now translated and spirv-val validated all 1,266 demanded programs, packed by exact full program hash using #9153 (its ten synthetic tests also pass); the all-demanded-cache runtime comparison is next, not yet evidence of rendered output. |
|
checked: Windows execution follow-up to the bare graphics code-base finding, on the private #8890 f1ab75a stack, RTX 5070 / 616.56. A synthetic bare vertex program flagged uses_code_base returned E_OUTOFMEMORY and a null PSO. Retaining the matched bare bytes for the existing code-base upload returned S_OK and a PSO. For the GPU check I used a synthetic bare pixel program with an embedded constant and a hand-written SPIR-V-compatible GLSL shader that reads it through the runtime's heap and code-base push constants. The mesh and ordinary vertex draws matched all 4,096 expected pixels. Changing only the embedded constant made the pixel check fail. On the offline retail stack with 14,185 validated graphics programs, doubling the shader arena from 256 to 512 MiB left all 123 slot-57 E_OUTOFMEMORY results in place. Retaining the bare program bytes at the default arena size converted all 123 into successes (19,313 to 19,436 of 25,450). The E_INVALIDARG count stayed at 6,014. All 408 GPU readbacks with the change were black. The retail comparison uses the same parser, mesh attribution and deferred pipeline creation as the previous boot report. AI-assisted. Aggregate results only. |
|
Follow-up on topology 19 (point 2 above), same library (my own 1.0.2.1 copy, counts only): 19 is the console's rectangle list. 385 of the 408 topology-19 records have no input elements. They are blits, down-samples, and tiled lighting and weathering passes. Their vertex programs build the position from the vertex index: indices 0..2 give (-1,1), (-1,-3) and (3,1), and index 3 would give (3,-3) = v1 + v2 - v0. That is the implied fourth corner of a 3-vertex rectangle primitive; read in perimeter order as a quad, it would be a bow-tie. The other 23 records have POSITION (plus COLOR and TEXCOORD) vertex buffers. The same branch now serves it:
Assumptions to check on a live draw: the title draws 3 vertices per rectangle (vertex counts that are multiples of 4 would contradict it), and the fourth corner is exact in clip space when w is equal on the three vertices. AI-assisted (Claude Code). |
|
Measured correction to the pipeline blob's input layout (this PR's parser, with #8754), from a retail boot on Linux: with the layout below, slot 57 goes from thousands of refused PSOs to 0 failures on my run. Setup: Arch Linux, Wine 11.22, GTX 1660 (NVIDIA 620.73.04, 32-wide), my own 1.0.2.1 copy; stack What I saw with the parser as it is: 141+ slot 57 calls, then the layer refuses most graphics PSOs with "the input layout does not feed COLOR1 (register 1)" (3,416 times in 300 s, about 3,860 with the other semantics) and a few with "vertex attribute format not supported yet" for format values that are ASCII (the bytes of a semantic name). What the blobs hold, read from 40 boot blobs of 120, 152 and 188 B (1, 2 and 3 elements, 6 distinct layouts): the element array is a serialized
Result with that parser (one local commit in the branch above, "slot 57 pipeline blob input layout is a serialized D3D12_INPUT_ELEMENT_DESC list"): in a 240 s run, 0 slot 57 failures, 0 "does not feed", 0 unsupported formats; the title goes from 1 Not run: this PR's unit tests with the changed parser ( AI-assisted (Claude). Counts, sizes, offsets in the blob and SDK names only; no game data. |
Summary
Adds measured support for Xbox
ID3D12Deviceslot 57 (DeserializeGraphicsPipelineStateX,+0x1c8, measured at RVA0x2477578) and<shaders>/fspx_gfx/index.jsonloading for native RDNA2 graphics stages (vs/ps/ms/gs), along with full documentation of the measured slot-57 blobs indocs/fspx.md.Unlike
slot 67(DeserializeComputePipelineStateXat RVA0x24800d5), which falls back toslot 62(CreateComputePipelineStateat RVA0x247fe66) whenslot 67fails,slot 57at RVA0x2477578has no fallback: on a negativeHRESULT(test r14d, r14d; js 0x2477a07) it leaves the PSO entry in the title's table null, causing a null graphics PSO dereference (mov r14, [rax+0x68]at RVA0xb5a5f8) once boot shader creation finishes and offlinexgamesaveinitialization begins.Measured Facts Included
ShaderLibrary<shaders>/fspx_gfx/index.jsonloading (runtime/src/shader_library.h):{fspx, bvh}to{fspx, fspx_gfx, bvh}.fspx_gfx_size()sofspx_size()(computefspx/),fspx_gfx_size()(graphicsfspx_gfx/), andbvh_size()(bvh/) remain separate.spvfilename overrides inShaderEntry(wherefspx_gfx/index.jsonuses the 64-characterfspx_code_sha256as the JSON key and stores<sha256[:16]>_lib(ps|vs)_<id>.spvinspv).PipelineState::create_graphicsfallback for bare RDNA2 program blobs vialibrary->fspx_candidates(stage.name, hash)(runtime/shims/d3d12_vulkan_device.cpp).Xbox
slot 57(DeserializeGraphicsPipelineStateX) layout (0x68bytes, 13 qwords) (runtime/shims/d3d12_xs_device.cpp,docs/fspx.md):+0x00:ID3D12RootSignature*+0x08/+0x10:state_blob(388 Bin boot PSOs 1–2,380 Bin boot PSO 3; magic0x4005d800/0x4005d808/0x4005d810)+0x18/+0x20:pipeline_blob(188 B/0xbcin boot PSOs 1–3; contains vertex input layout)+0x28/+0x30:prog_a(native RDNA2 program Add pytest regression tests for the RDNA2 -> SPIR-V translator, plus a Linux CI job #1, ornullptr/0in VS-only PSOs such as boot PSO 3)+0x38/+0x40:stage_a(kind-2 stage blob Add pytest regression tests for the RDNA2 -> SPIR-V translator, plus a Linux CI job #1, e.g.208 B, ornullptr/0)+0x48/+0x50:prog_b(native RDNA2 program Vulkan tools: fix builds on Linux #2, e.g.320..384 B)+0x58/+0x60:stage_b(kind-2 stage blob Vulkan tools: fix builds on Linux #2, e.g.752 B)8916,8917,12511), pair 2 (+0x28/+0x30,448 B/768 B) is the pixel shader (ps) and pair 4 (+0x48/+0x50,384 B/320 B) is the vertex shader (vs). Stage assignment is therefore taken fromentry->stageinfspx_gfx/index.jsonbysha256(program_bytes), never assumed from blob position.ID3D12Device4::CreateProtectedResourceSessionforwarding on slot 57 whenriid != IID_ID3D12PipelineState.Measured
188 B(0xbc)pipeline blobinput-layout parser & tail-truncation guard:+0x10: per-element field block size (0x1c= 28 B in PSOs 1–2,0in PSO 3)+0x38:4 + n*28 + sum(len(name)+1)(0x70= 112 in PSOs 1–3)+0x4c:num_elements(3)+0x54..: array ofNUL-terminated ASCII semantic name + 7u32s (+0x00InputSlot,+0x04DXGI_FORMAT,+0x08SemanticIndex,+0x0cAlignedByteOffset).POSITION(DXGI_FORMAT_R32G32B32_FLOAT@0),COLOR(DXGI_FORMAT_R8G8B8A8_UNORM@12),TEXCOORD(DXGI_FORMAT_R32G32_FLOAT@16).TEXCOORDat0x9b+ 9 B name + 28 B fields ends at0xc0, truncated at0xbc),parse_xbox_pipeline_blob_input_layoutchecks bounds withmemchrand never reads pastblob_size.Measured
380..388 Bstate bloboffset logging:[rt] d3d12_xs: state blob: campo sin identificar en 0x%03x = 0x%08x) without guessing unconfirmed fixed-function D3D12 state fields.Verification
python -I scripts/check_no_game_data.pypassed on all modified files.device_proxy,xs_proxy_mock,d3d12_compute,d3d12_fspx_compute,root_signature,pipeline_cache_fileall 100% PASS, including aPAGE_NOACCESSguard-page test on the truncated 188-byte pipeline blob and syntheticfspx/fspx_gfx/bvhindex count isolation test).