d3d12: Support two-sided stencil refs and masks
Independent stencil refs and masks for front and back stencils were added in D3D quite some time ago and are supported by WARP in CI.
For masks, we need D3D12_FEATURE_DATA_D3D12_OPTIONS14::IndependentFrontAndBackStencilRefMaskSupported
and changing the way we create the PSO to use CreatePipelineState
with a D3D12_PIPELINE_STATE_STREAM_DESC
that can specify separate mask values for front and back.
For refs, we need D3D12_FEATURE_DATA_D3D12_OPTIONS14::IndependentFrontAndBackStencilRefMaskSupported
and to QI an ID3D12GraphicsCommandList8
to use OMSetFrontAndBackStencilRef
.
Updating the DirectX-Headers subproject is along for the ride to use CD3DX12_PIPELINE_STATE_STREAM3
.