Repository navigation
d3d12: a pipeline stream the PC numbering cannot read is read with the console's, its 24 the mesh shader (D3D-CONSOLE-STREAM-ENUM) - #496
Conversation
…e console's (its 24 is the mesh shader) The console's pipeline-state subobject enum has no gap at 23 where the PC's has one (PC: VIEW_INSTANCING 22, AS 24, MS 25, DEPTH_STENCIL2 26, ...), so the title's mesh-shader subobject is 24, which the PC reading takes for an amplification shader. A retail boot (docs/retail_boot_intel_host.md, section 3) refused 430 such PSOs as unsupported; 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). The translator makes 9,282 of the title's 26,503 shaders mesh shaders. CreatePipelineState now reads a stream again with the console numbering (a type from 23 on is the PC type one above it) when the PC reading refuses it or leaves it with an AS and no MS, and takes that reading when it 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. d3d12_mesh_test: console streams (MS as 24; MS as 24 with RASTERIZER1 as 26, which the PC reading refuses as a truncated DEPTH_STENCIL2) make mesh PSOs; an MS with a 24 in PC numbering is still refused as an AS; the 9 invalid and 2 not-implemented refusals are unchanged; the draws still match all 4096 pixels (RTX 3080 Laptop). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… lazy PSOs, console formats, XG, title memory) Measured on the retail boot under Wine 11.22 (RX 9060 XT, RADV): it now creates 10,000+ slot 57 pipelines, runs its loading frame loop at ~2.5-4 GB, and, with the hang check held off (LEONIDA_SLOW_STARTUP=1), starts real rendering at ~120 s. Frames are still black, and that run stops at game+0x13360a3 (a game object with a garbage vtable; not caused by anything below that was tested). From open pull requests (applied as patches, conflicts resolved here): - ProjectLeonida#511 (VibeClauding): LEONIDA_LAZY_PSO=1, pipelines built at first draw/dispatch. Local fix on top: the rect-list path's VS words were cleared before rect_list_geometry read them, refusing every rectangle-list PSO; the compute compile keeps this branch's host-stall scope. - ProjectLeonida#496 (Rüzgar Koray Genç): console pipeline-stream numbering (24 = mesh shader). - ProjectLeonida#461 (oscarlosu-lab): xg_xs texture layout and computer (ported from Marvisak/VIctory, GPL-3.0). - Draft ProjectLeonida#321 (Mumogg, 237f9e0): vertex/index views in title CPU memory copied into a ring (title_memory). Local fixes: - Slot 57 pipeline blob elements: +0x00 is SemanticIndex, +0x08 InputSlot (swapped before; docs/fspx.md and the device_proxy test updated). ~4,900 "input layout does not feed COLOR1" refusals were this. - FSPX graphics stages that read their code base use the kind-6 program as code (was empty -> E_OUTOFMEMORY). - Console formats 118/119/120 (hypothesis: D16_UNORM_S8_UINT family) aliased to the D24S8 family at the device's entry points. - Depth-stencil + UAV stand-in extended to slots 108, 127 and the slot-133 texture fallback; a UAV initial state on such a texture starts in COMMON. Slot 108 logs refusals (the title asserts its answer is below 4 GiB). - 8-bit RGBA/BGRA render targets accept a UNORM/sRGB view without a castable list. - Fence slot 12 mirrors refreshed by one poller thread (LEONIDA_FENCE_MIRROR=tp keeps the thread-pool waits, which queued on Wine's wait-queue lock); xs_proxy_mock tests run in tp mode. - Slot-133 shadow buffers keep their VirtualQuery layout between refreshes (178 MB: 70 ms -> ~8.5 ms) and the refresh counts as a host stall. Diagnostics and experiments (off unless noted): - LEONIDA_DRAW_DIAG=1: per-present draw counts and per-draw pipeline/target/depth/viewport/vb0 for early frames. - Slot 57 refusal layout dump and created/failed totals; refused RTV and committed-resource details; failed ExecuteCommandLists names its vulkan_replay.h line (on by default, test-branch lines). - LEONIDA_SLOW_STARTUP=1: guest Sleep of 1-2.1 s lasts 2.1 s, so the startup hang check never counts (hides hangs). - LEONIDA_XG_NO_COPY=1: texture computer slots 8/9 copy nothing. Co-authored-by: VibeClauding <360230414+VibeClauding@users.noreply.github.com> Co-authored-by: Rüzgar Koray Genç <koray_genc1@hotmail.com> Co-authored-by: oscarlosu-lab <251827664+oscarlosu-lab@users.noreply.github.com> Co-authored-by: Mumogg <104529023+Mumogg@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The retail-boot test the description lists as not done, on Windows 11 26300, MSVC 19.44, own 1.0.2.1 copy, AMD Radeon RX 9070 XT (RDNA4, 32.0.32029.2010): pass. Base: #321 at
The runtime logs
Not checked: whether the renumbered streams draw correctly (the run doesn't get far enough into frames to tell). AI-assisted (Claude Code). |
|
Tested on native Windows: Windows 10 22H2 (19045), NVIDIA GeForce RTX 3060, driver 610.88 (32.0.16.1088), MSVC 19.44, own 1.0.2.1 copy,
|
…g cannot read is read with the console's (its 24 is the mesh shader)
…peline-stream notes ProjectLeonida#496 reads LEONIDA_XS_STREAM_ENUM in d3d12_vulkan_device.cpp but documents it nowhere, so test_docs_env_vars fails on integration after batch 5c. One paragraph under D3D-29's stream bullets says what the console reading does and what =pc turns off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent check. Windows 10 Pro 22H2 (19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0,
Reading note: the comment above Synthetic tests only, no game files. AI-assisted (Claude Code): I read the diff and ran the tests on that machine. |
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.mdsection 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:
CreatePipelineStatereads a stream again with the console numbering (a type from 23 on is the PC type one above it) when either: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=pcturns 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):Tested on Windows 10, i7-11800H, RTX 3080 Laptop (NVIDIA driver), on
main8f481cf16:d3d12_meshpasses. Not yet tested on a retail boot.🤖 Generated with Claude Code