mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #1740] d3d12: log the pipeline state stream refusal reason for E_INVALIDARG #1755
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1755
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1740
Author: @Mby159
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/pso-stream-refusal-reason📝 Commits (1)
28f9123d3d12: log the pipeline state stream refusal reason for E_INVALIDARG (RT-PSO-STREAM-EINVALIDARG-REASON)📊 Changes
3 files changed (+42 additions, -19 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+7 -4)📝
runtime/shims/d3d12_vulkan_device.cpp(+34 -14)📝
runtime/shims/d3d12_xs_device.cpp(+1 -1)📄 Description
Claimed in the coordination issue as: RT-PSO-STREAM-EINVALIDARG-REASON
(https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7159937113)
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
main57ba40bd6: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 ofmain57ba40bd6is 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)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.