1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[d3d11] Only store low 8 bits of stencil reference

Seems to match behaviour of the D3D11 runtime, in that OMGetDepthStencilState
will not retain the high bits.

Found by CME. Should fix #1784.
This commit is contained in:
Philip Rebohle 2022-12-11 19:28:37 +01:00 committed by Philip Rebohle
parent 7b2024888e
commit c55c09368b

View File

@ -2261,6 +2261,10 @@ namespace dxvk {
ApplyDepthStencilState();
}
// The D3D11 runtime only appears to store the low 8 bits,
// and some games rely on this behaviour. Do the same here.
StencilRef &= 0xFF;
if (m_state.om.stencilRef != StencilRef) {
m_state.om.stencilRef = StencilRef;
ApplyStencilRef();