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.
…PSO-STREAM-REFUSAL-REASON) The reasons the pipeline state stream refusals carry are now the ones the log, the trace and the console audit all read: - the generic reason (a refusal of the graphics state itself) is left in d3d12_trace::stream_refusal, so the console audit prints it instead of "-"; - the console re-read of a stream keeps its reason out of the log: that reading may be discarded, and a stream that was built must not show a refusal; - the classic CreateGraphicsPipelineState and CreateComputePipelineState paths clear the field, so no reason of one call is left behind for another; - docs/d3d12_vulkan.md names the cases the stream's own refusals give and says that the graphics state's refusals keep one generic reason. No HRESULT changes.
This was referenced Dec 1, 2026
Contributor
|
PSO diagnostic comparison on an RTX 4070 SUPER at
MEASURED with the repository’s synthetic fixtures. AI-assisted (Codex). |
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.
Claimed in the coordination issue as: RT-PSO-STREAM-REFUSAL-REASON
(#2570 (comment))
Depends on: none
Continues #1740, which was closed on 28 November only to rotate this account's single open pull request slot
(#2618 has since merged). Its head branch has since been rebased, so this is the same change on the current
main; the review of the first version is in #1740's comments.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.