[PR #496] d3d12: a pipeline stream the PC numbering cannot read is read with the console's, its 24 the mesh shader (D3D-CONSOLE-STREAM-ENUM) #545

Open
opened 2026-11-26 20:18:14 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/496
Author: @Kokonotcu
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: pr/console-stream-enum


📝 Commits (1)

  • 30dd1a4 d3d12: a pipeline stream the PC numbering cannot read is read with the console's (its 24 is the mesh shader)

📊 Changes

2 files changed (+69 additions, -2 deletions)

View changed files

📝 runtime/shims/d3d12_vulkan_device.cpp (+41 -2)
📝 runtime/test/d3d12_mesh_test.cpp (+28 -0)

📄 Description

Claim: D3D-CONSOLE-STREAM-ENUM (#14).

What was wrong: the console's pipeline-state subobject enum has no gap at 23, where the PC's has one. The PC numbering is VIEW_INSTANCING 22, AS 24, MS 25, DEPTH_STENCIL2 26, and so on. As a result, the title's mesh-shader subobject is 24, which the PC reading takes for an amplification shader. The layer refuses an AS, so those PSOs fail as unsupported.

docs/retail_boot_intel_host.md section 3 measured this in a retail boot: 430 such PSOs were refused, and each one's 24 carried a payload the size of one of the title's mesh-shader containers (430 of 430; 280 of those sizes match no vertex shader, against the VS reading proposed on the old repository's issue 8815). The translator makes 9,282 of the title's 26,503 shaders mesh shaders.

What changed: CreatePipelineState reads a stream again with the console numbering (a type from 23 on is the PC type one above it) when either:

  • the PC reading refuses it, or
  • the PC reading leaves it with an AS and no MS, which is no valid PC stream.

It takes the console reading only when that reading holds an MS and no AS. A stream the PC reading accepts is never read differently, so no PSO that builds today changes. LEONIDA_XS_STREAM_ENUM=pc turns it off. The first renumbered stream is logged once.

What this assumes beyond the measurement: that the console shifts every type from 23 on, not only the mesh shader. Only 24 is measured. The shift of 25 and up is the reading under which a 24 = MS is consistent; it is used only for streams that fail today anyway.

Tests (d3d12_mesh_test, new checks):

  • A console stream with the MS as 24 makes a mesh PSO.
  • So does the MS as 24 with RASTERIZER1 as 26 (the PC reading refuses that one as a truncated DEPTH_STENCIL2).
  • An MS (25) with a 24 in PC numbering is still refused as an AS.
  • The existing 9 invalid and 2 not-implemented refusals are unchanged, and the draws still match all 4096 pixels.

Tested on Windows 10, i7-11800H, RTX 3080 Laptop (NVIDIA driver), on main 8f481cf16: d3d12_mesh passes. Not yet tested on a retail boot.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/496 **Author:** [@Kokonotcu](https://github.com/Kokonotcu) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/console-stream-enum` --- ### 📝 Commits (1) - [`30dd1a4`](https://github.com/ubiquitarianism/leonida/commit/30dd1a45002a132857ea742155d269695ed3a4c4) d3d12: a pipeline stream the PC numbering cannot read is read with the console's (its 24 is the mesh shader) ### 📊 Changes **2 files changed** (+69 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+41 -2) 📝 `runtime/test/d3d12_mesh_test.cpp` (+28 -0) </details> ### 📄 Description Claim: D3D-CONSOLE-STREAM-ENUM (#14). **What was wrong:** the console's pipeline-state subobject enum has no gap at 23, where the PC's has one. The PC numbering is VIEW_INSTANCING 22, AS 24, MS 25, DEPTH_STENCIL2 26, and so on. As a result, the title's mesh-shader subobject is 24, which the PC reading takes for an amplification shader. The layer refuses an AS, so those PSOs fail as unsupported. `docs/retail_boot_intel_host.md` section 3 measured this in a retail boot: 430 such PSOs were refused, and each one's 24 carried a payload the size of one of the title's mesh-shader containers (430 of 430; 280 of those sizes match no vertex shader, against the VS reading proposed on the old repository's issue 8815). The translator makes 9,282 of the title's 26,503 shaders mesh shaders. **What changed:** `CreatePipelineState` reads a stream again with the console numbering (a type from 23 on is the PC type one above it) when either: - the PC reading refuses it, or - the PC reading leaves it with an AS and no MS, which is no valid PC stream. It takes the console reading only when that reading holds an MS and no AS. A stream the PC reading accepts is never read differently, so no PSO that builds today changes. `LEONIDA_XS_STREAM_ENUM=pc` turns it off. The first renumbered stream is logged once. What this assumes beyond the measurement: that the console shifts every type from 23 on, not only the mesh shader. Only 24 is measured. The shift of 25 and up is the reading under which a 24 = MS is consistent; it is used only for streams that fail today anyway. **Tests (`d3d12_mesh_test`, new checks):** - A console stream with the MS as 24 makes a mesh PSO. - So does the MS as 24 with RASTERIZER1 as 26 (the PC reading refuses that one as a truncated DEPTH_STENCIL2). - An MS (25) with a 24 in PC numbering is still refused as an AS. - The existing 9 invalid and 2 not-implemented refusals are unchanged, and the draws still match all 4096 pixels. Tested on Windows 10, i7-11800H, RTX 3080 Laptop (NVIDIA driver), on `main` `8f481cf16`: `d3d12_mesh` passes. Not yet tested on a retail boot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#545
No description provided.