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. |
Claimed in the coordination issue as: RT-PSO-STREAM-EINVALIDARG-REASON
(#1608 (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
main57ba40b:runtime/shims/d3d12_vulkan_device.cpp:12127: 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:4729: theLEONIDA_PSO_STREAM_AUDITgate fires forE_NOTIMPLandE_FAILonly, andaudit_pso_streamis called from that console proxy path alone, so the PC path prints no audit line either.This pull request gives each refusal a reason and prints it once, next to the existing
stream_unsupportedhelper:parse_pipeline_stream: a reason for everyE_INVALIDARG— the stream has no subobjects, it 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;create_graphics: the two mesh cases (a mesh pipeline with a vertex, tessellation or geometry stage; a graphics pipeline with no vertex stage) name their reason too; the remaining graphics-state refusals get one generic reason;CreatePipelineStateprints each reason once throughlog_once(no environment variable needed) and records theE_INVALIDARGrefusals in thePipelineStream::Refusedtrace when tracing is on; the console proxy'sLEONIDA_PSO_STREAM_AUDITgate is widened toE_INVALIDARG, and the audit call site stays console-only;docs/d3d12_vulkan.mddescribes the refusal reason and the audit.The HRESULTs do not change: every refusal still returns
E_INVALIDARG. What is added is a reason string, one[rt] d3d12: <reason> <type>line per distinct (reason, subobject type) pair, one[d3d12-trace]record per refusal when tracing is on, and the console path's audit line for anE_INVALIDARGrefusal whenLEONIDA_PSO_STREAM_AUDIT=1is set.Tested
clang++ -std=c++20 -fsyntax-only(LLVM/Clang 21 from llvm-mingw,-fms-extensions,-ferror-limit=0,-Wall -Wextra) onruntime/shims/d3d12_vulkan_device.cppandruntime/shims/d3d12_xs_device.cpp: the diagnostic set of this branch and ofmain57ba40b is the same (508 lines / 34 distinct messages on the first file, 2 / 2 on the second, identical on both sides), so the change adds none. The five errors in that set are pre-existing onmainand come from the stub headers this machine has instead of the Windows SDK; this is a diagnostic-parity check, not a build..github/workflows/runtime.yml) builds theruntime/tree with MSVC onwindows-latestand runs the CPU runtime tests withctest, and it runs on pull requests whose changed paths includeruntime/**, so it covers this change; that build was not run here.GPUs tested: none — no GPU on this machine, nothing was run on one
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (not applicable: no translator rule is added)