feat(d3d12_x): create graphics pipelines through the pipeline library, cache first #47
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!47
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/47/head"
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?
@Dark3581 on GitHub · 2026-11-22 21:12 UTC · original
Dark3581:feat/pipeline-library-graphics→main· +399 −5 · 10 files · 1 commits · merged 2026-11-22 21:15 UTCWhat
The full translation of a graphics pipeline state description, ready for the device's
CreateGraphicsPipelineState:GraphicsPipelineRequest(pso/PipelineState.cpp): resolves the vertex, geometry and pixel shaders through the store (each with a stage check and its own error), translates the render state (#44) and the input layout against the vertex shader's inputs (#46), and keys the request by the shader keys plus an encoding of every translated field, so equal descriptions share one pipeline and any state difference gives another. A geometry shader adds thegeometryShaderrequirement. A cached pipeline blob is ignored, as for compute.PipelineLibrary::Graphics: the same cache-first rule as compute. It asks the driver for the pipeline without compiling, compiles only when that fails, refuses a pipeline whose modules together are over the run-time compile limit, and creates each key once even when several threads ask at the same time. Compute and graphics now share one slot path (Obtain), with separate key spaces.GraphicsStateKey(vulkan/GraphicsPipeline.cpp) encodes the translated state and vertex input.pso_probe:dump-test-shaderswrites the embedded test SPIR-V, andgraphicsruns a description through store, request and library on four threads (seven requests over two states).Tested
Windows 10, MinGW build, RTX 3070 Ti (driver 621.14).
pipeline_statebuilds a store from the test shaders (a plain vertex shader, one with three inputs, a pixel shader) and checks: the three error paths (an uncovered input, a pixel shader as vertex shader, a vertex shader as pixel shader); seven concurrent requests over two keys give exactly two pipelines, the same handle per key; a saved cache givesreadyfor both on the next run; the vertex-input pipeline (3 attributes); with an empty cache and a 16-byte limit nothing is compiled.shaders_psoon one title's store still passes (12 compute shaders, the largest refused, 8 title vertex shaders as graphics pipelines, 9 of 13 from the offline cache).ctest: 66 of 66.python tools/check_conventions.pyanddebt_fold.py --check: ok. No barestd::min/std::max.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md