Commit Graph

2 Commits

Author SHA1 Message Date
a7d86d8c76 d3d12: separate front and back stencil masks (D3D-STENCIL-FACE-MASKS)
A DEPTH_STENCIL2 subobject whose FrontFace and BackFace masks differ was
refused with E_NOTIMPL, and OPTIONS14 reported
IndependentFrontAndBackStencilRefMaskSupported = FALSE although the
per-face references of OMSetFrontAndBackStencilRef already reach the
draw. Vulkan has a compare and a write mask per face in VkStencilOpState.

parse_pipeline_stream keeps the front face's masks in the description and
the back face's beside it (PipelineStream::back_stencil), create_graphics
takes them as an optional argument for depth.back, and OPTIONS14 now
reports the cap. The classic CreateGraphicsPipelineState path and its
cached-PSO key are unchanged: D3D12_DEPTH_STENCIL_DESC has one mask pair.

d3d12_state_sweep_test builds 16 more PSOs from a stream with
DEPTH_STENCIL2 (same, split, front-only and back-only masks; one reference
or two through OMSetFrontAndBackStencilRef; front- and back-facing) and
compares the colour and stencil readback with the host D3D12 device: 498
cases, 0 differ on an RTX 5070 Ti. Giving the back face the front face's
masks makes 6 of them differ. d3d12_vulkan_device_test expects the cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 19:49:09 +05:00
45a4d888e8 d3d12_state_sweep_test: blend, depth and stencil state against the host D3D12 device
482 full-screen draws (every colour and alpha blend factor pair, blend
operations, write masks, sRGB, float, 10-bit, 16-bit and SNORM targets,
the depth comparison functions with and without writes, stencil
functions, pass, fail and depth-fail operations, read and write masks, and
the back face's own state) run on the layer and on the host device on the
same adapter, and the colour and stencil bytes are compared.

AI-assisted.
2026-11-23 01:33:20 +01:00