Repository navigation
d3d12: support console-numbered PSO streams under LEONIDA_PIPELINE_COMPILE=on-demand (RT-ONDEMAND-CONSOLE-STREAM-ENUM) - #1779
Closed
IlyassRS3 wants to merge 1 commit into
Conversation
Under LEONIDA_PIPELINE_COMPILE=on-demand (set by --first-run-ui), device slot 86 routes to Device::prepare_console_stream instead of eager ID3D12Device2::CreatePipelineState. prepare_console_stream previously parsed only with PC subobject numbering and called PsoStreamRecord::capture(source) without the console flag, rejecting console-numbered mesh streams (type 24 = MS, type 26 = RASTERIZER1) and leaving captured tags unnormalized for slot 55 derivation and bind-time resolve_type. Extract parse_pipeline_stream_any shared by CreatePipelineState and prepare_console_stream, pass used_console to PsoStreamRecord::capture, reject unsupported stages and missing VK_EXT_mesh_shader / mesh root_window up front in prepare_console_stream, run LEONIDA_PSO_STREAM_AUDIT consistently across both paths in create_pso_from_stream, make d3d12_mesh_test's temp folder per-process, and register d3d12_mesh_on_demand in CTest. Item: RT-ONDEMAND-CONSOLE-STREAM-ENUM
Contributor
Author
|
Closing in favor of @JesusACD, who claimed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes console-numbered pipeline state streams from Xbox device slot 86 under
LEONIDA_PIPELINE_COMPILE=on-demand(--first-run-ui), following up @thiefyzheng's finding in #1608 (#1608#issuecomment-7161103050).RT-ONDEMAND-CONSOLE-STREAM-ENUMPipelineState::resolve_typeis intentionally untouched so this stays conflict-free with d3d12: realize console streams with their depth-bounds flag and back-face stencil masks (RT-DEPTHBOUNDS-STREAM-EXTRAS) #1695.Root cause
When
LEONIDA_PIPELINE_COMPILE=on-demandis active (--first-run-ui),set_device_outerregistersDevice::prepare_console_streamasproxy->prepare_stream, so Xbox device slot 86 (create_pso_from_stream) bypassesDevice::CreatePipelineState:prepare_console_streamcalledparse_pipeline_stream(source, stream)with PC numbering only, omitting the console subobject numbering retry (type 24=MS,type 26=RASTERIZER1). A console mesh stream with raw tag24alone parsed as PCASand returnedE_NOTIMPL; with raw tag26(RASTERIZER1read as larger PCDEPTH_STENCIL2) it returnedE_INVALIDARG.prepare_console_streamcalledPsoStreamRecord::capture(source)without passingused_console, so raw console tag26failedwalk()(E_INVALIDARG) and raw console tag24was never rewritten to canonical PC numbering (25=MS) for slot-55 derivation (derive_stream) or bind-time realization (PipelineState::resolve_type).prepare_console_streamdid not mirror eagercreate_graphics's up-front refusals for missingVK_EXT_mesh_shader,StreamOutput,MS+GS, or a mesh shader missingroot_window, andcreate_pso_from_streamskippedLEONIDA_PSO_STREAM_AUDITon theprepare_streampath.Changes
runtime/shims/d3d12_vulkan_device.cpp:parse_pipeline_stream_any()soDevice::CreatePipelineStateandDevice::prepare_console_streamshare the exact same PC-first / console-fallback parser andused_console_streamtracking.used_consoletoPsoStreamRecord::capture(source, used_console)inprepare_console_stream, mirror eager refusals (AS,HS/DS/StreamOutput, missingVK_EXT_mesh_shader,MS+GS, meshgraphics_root_window), and recordPipelineStream::Refused/PipelineStream::Mesh.runtime/shims/d3d12_xs_device.cpp:LEONIDA_PSO_STREAM_AUDITonprepare_streamrefusals too and avoid duplicatekeep_pso_streamwhenprepare_streamalready captured the record.runtime/test/d3d12_mesh_test.cpp&runtime/CMakeLists.txt:d3d12_mesh_test's temporary shader library directory per-process (GetCurrentProcessId()) sod3d12_meshandd3d12_mesh_on_demandcan run concurrently underctest -j.VK_EXT_mesh_shader(E_NOTIMPL),ms_oldwithoutroot_window(E_INVALIDARG), and non-mesh DXIL kind 14 in tag 24.d3d12_mesh_on_demandwithLEONIDA_PIPELINE_COMPILE=on-demand(exercises slot-86 console streams with/without raw tag26, slot-55 derivation, bind-timeresolve_type, and fullDispatchMeshpixel readback).runtime/test/pso_stream_test.cpp:test_console_stream_normalizationcovering raw console tags24(MS) and26(RASTERIZER1) rejection underconsole=false, tag normalization (24 -> 25,26 -> 27) and deep copy underconsole=true, and subsequent slot-55derive_stream.Verification
d3d12_vulkan_device.cpp,d3d12_xs_device.cpp,d3d12_mesh_test.cpp, andpso_stream_test.cppare Windows-only and could not be compiled or run locally — relies on Windows CI / Windows GPU verification ofpso_stream,d3d12_mesh, andd3d12_mesh_on_demand).python3 -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp runtime/shims/d3d12_xs_device.cpp runtime/test/d3d12_mesh_test.cpp runtime/test/pso_stream_test.cpp runtime/CMakeLists.txt— passpython3 -I tests/test_text_write_line_endings.py— 3/3 pass