feat(d3d12_x): translate graphics pipeline state to Vulkan #44
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!44
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/44/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 20:30 UTC · original
Dark3581:feat/graphics-pipeline-state→main· +1052 −7 · 19 files · 1 commits · merged 2026-11-22 20:43 UTCWhat
The render-state half of graphics pipeline creation, the part that does not depend on a title's shaders or input layout:
pso/GraphicsState.cpp:D3D12_GRAPHICS_PIPELINE_STATE_DESCto Vulkan state. Blend (independent blend, dual-source factors, write masks, logic operations), rasterizer (fill, cull, winding, depth bias and clamp, depth clip as depth clamp), depth-stencil (both stencil faces; depth and stencil tests are off without a depth or stencil format, as in D3D12), sample count, mask and alpha to coverage, topology class and strip cut, and DXGI render target and depth formats (packed formats mapped by bit layout, for exampleR10G10B10A2toA2B10G10R10_PACK32). Every enum is mapped by name. Tessellation, stream output, conservative rasterization, forced sample counts, unknown sample qualities, pipeline state flags, other nodes and formats without a mapping are refused with an error naming the value. The Vulkan features the state needs are recorded.vulkan/GraphicsPipeline.cpp: creates the pipeline with dynamic rendering and the title layout. Viewports and scissors (with count), blend constants, stencil reference, the exact topology, primitive restart and vertex buffer strides are dynamic, because D3D12 sets them while recording. A state that needs a feature the device lacks is refused before reaching the driver.dynamicRendering(validation caught that it was missing) and, when offered,fillModeNonSolid,logicOp,depthClamp,depthBiasClamp,independentBlendanddualSrcBlend; loadsvkCreateGraphicsPipelines.graphics_test.vert,graphics_float.frag,graphics_uint.fragwith their compiled.inc, built the way BUILD.md describes.The gaps (depth bias units for floating-point depth, ignored line modes,
D24_UNORM_S8_UINTpassed through, the winding assumption) are in the debt fragment.Tested
Windows 10, MinGW build, RTX 3070 Ti (driver 621.14), Khronos validation layer from the Vulkan SDK 1.4.363.
pso_probe graphics-selftest(no GPU): format, blend, logic, compare, stencil, topology and sample mappings, 16 distinct logic ops, 8 compare and 8 stencil ops, the default description's state, three edited descriptions field by field, and 20 refusals with their messages.pso_probe graphics-gpu --validate: 7 descriptions (opaque; three targets with independent blend and two-sided stencil onD32_FLOAT_S8X24; wireframe with front culling, depth bias and depth clamp on lines; 4x MSAA with alpha to coverage and a sample mask on points; XOR logic op on an integer target; depth only with strip cut; a gap in the render targets) create pipelines with 0 validation errors. Both run in thepipeline_statetest.ctest: 61 of 61.python tools/check_conventions.py: ok.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