Repository navigation
Conversation
…(RT-PSO-STREAM-EINVALIDARG-REASON) The PC CreatePipelineState refuses a pipeline state stream with E_INVALIDARG without saying why: the finish lambda records a PipelineStream::Refused trace for E_NOTIMPL only, and every E_INVALIDARG from parse_pipeline_stream returns a bare HRESULT, so d3d12_trace::stream_refusal stays null. The console audit gate fires for E_NOTIMPL and E_FAIL only, and audit_pso_stream is called from that console proxy path only, so the PC path prints no audit line either. Each refusal now names its case and is logged once, next to stream_unsupported: the stream has no subobjects, ends inside a subobject type or payload, an unknown subobject type, two subobjects of one family, a compute stage with graphics stages, no shader stage, a mesh pipeline with a vertex, tessellation or geometry stage, a graphics pipeline with no vertex stage. The PC path records the E_INVALIDARG refusals in the trace, LEONIDA_PSO_STREAM_AUDIT=1 prints them, and the remaining graphics-state refusals keep one generic reason. docs/d3d12_vulkan.md follows. No game files: a stream is read from the caller's own description.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Clean-Room & Technical Verification
- Mergeability: 3-way merge against upstream
main(bcaa13dad) is 100% clean with zero merge conflicts. - Clean-Room Compliance: 100% clean-room. D3D12 pipeline stream diagnostic logging and parser hardening only; zero retail code, game data, or keys (
check_no_game_data.pyclean). - Technical Rigor & Diagnostic Visibility:
- Previously,
parse_pipeline_streamreturned bareE_INVALIDARGwithout recording a refusal reason intod3d12_trace::stream_refusalor logging reasons, leaving pipeline refusals completely silent. - Implements
stream_invalid()logging each distinct refusal once vialog_once(e.g. stream has no subobjects, ends inside type or payload, duplicate subobject family, invalid stage mixtures, or missing vertex stage) and settingd3d12_trace::stream_refusal. - Extends
PipelineStream::Refusedrecording to capture bothE_NOTIMPLandE_INVALIDARG, and widens the console proxy audit gate (LEONIDA_PSO_STREAM_AUDIT) to auditE_INVALIDARGrefusals. - Updates documentation in
docs/d3d12_vulkan.md.
- Previously,
LGTM! Approved.
|
Built and ran #1740 at head Config: Windows 11 (26300), RTX 4060 desktop, NVIDIA 610.88, MSVC 19.44, RelWithDebInfo, Vulkan SDK 1.4.363.0. Test targets only, no game files.
Not covered: the full runtime build ( AI-assisted: yes (Claude Code ran the tests) |
|
Five of the six failing checks below come from a test that fails the same way on a tree that does not contain this change; the sixth ( The diff is 3 files: Per check, with the failing test named:
The Local reproductions ran on Windows 11 10.0.29712 with CPython 3.13.17, llvm-mc 23.1.6 and SPIRV-Tools on PATH. We did not build this branch here (no MSVC and no Windows SDK on this machine), so this is attribution of the CI results, not a build. |
|
Temporarily closed to rotate this account's single open pull request slot: this repository limits users without write access to one open pull request each, and this one has held the slot since 26 November. The change is not withdrawn and the branch is kept. It will be reopened once the other pull request merges. |
|
Continued in #2918: this pull request's head branch was rebased onto the current The claim is in the coordination issue: #2570 (comment) AI-assisted. |
Claimed in the coordination issue as: RT-PSO-STREAM-REFUSAL-REASON
(#2570 (comment))
Depends on: none
What and why
ID3D12Device2::CreatePipelineStaterefuses a pipeline state stream withE_INVALIDARGwithout saying why, so a pipeline that is skipped cannot be seen in the log.Two places make the refusal silent, both on
main:runtime/shims/d3d12_vulkan_device.cpp: thefinishlambda of the PCCreatePipelineStaterecords aPipelineStream::Refusedtrace forE_NOTIMPLonly, and everyE_INVALIDARGfromparse_pipeline_streamreturns a bare HRESULT, sod3d12_trace::stream_refusalstays null;runtime/shims/d3d12_xs_device.cpp: the console proxy'sLEONIDA_PSO_STREAM_AUDITgate fires forE_NOTIMPLandE_FAILonly, andaudit_pso_streamis called from that console proxy path only, so the PC path prints no audit line either.Each refusal now names its case and is logged once, next to
stream_unsupported: the stream has no subobjects, ends inside a subobject type or payload, an unknown subobject type, two subobjects of one family, too many render targets, a compute stage with graphics stages, no shader stage, a mesh pipeline with a vertex, tessellation or geometry stage, a graphics pipeline with no vertex stage, and no description. The PC path records theE_INVALIDARGrefusals in the trace,LEONIDA_PSO_STREAM_AUDIT=1prints them, and the remaining graphics-state refusals keep one generic reason.docs/d3d12_vulkan.mdfollows.No HRESULT changes.
What is new since the first review
d3d12_trace::stream_refusalfor the audit to print (it used to print-), the console re-read of a stream keeps its own reason out of the log (that reading may be discarded, and a stream that was built must not show a refusal), and the classicCreateGraphicsPipelineState/CreateComputePipelineStatepaths clear the field so that no reason of one call is left behind for another;docs/d3d12_vulkan.mdnames the cases the stream's own refusals give, and says that the refusals of the graphics state itself keep one generic reason (there are more than a dozen of those, and they are not named here).The classic path now logs the reason of a refusal it used to pass over in silence (a graphics pipeline with no vertex stage). That is deliberate: the refusal is the caller's mistake and it is worth seeing. It does not change any HRESULT.
Tested
ctestgreen, and the reasons printed once each.python3 -I -m unittest discover -s tests -p "test_docs_*.py"→ 57 tests, OK.python3 -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp runtime/shims/d3d12_xs_device.cpp docs/d3d12_vulkan.md→ exit 0.What was not tested here
runtime/is Windows-only andruntime.ymlno longer runs on push or on a pull request (the legacy C++ runtime is deprecated in favour of the Rust runtimes), so no CI job compiles this diff. The Windows build and thectestrun above are the evidence.d3d12_mesh_testcases (theE_INVALIDARGset this change touches) were not run.No game files: a stream is read from the caller's own description.
AI-assisted.