Ignore stencil ref in bstencil param. Avoids assert in StateCacheT:add when D3D11 deduplicates identical ID3D11DepthStencilState s (#1391)

This commit is contained in:
MaulingMonkey 2018-05-16 08:43:26 -07:00 committed by Branimir Karadžić
parent 08e2b86fdf
commit 8b1e3cf8cf
4 changed files with 4 additions and 4 deletions

View File

@ -2749,7 +2749,7 @@ namespace bgfx { namespace d3d11
uint32_t fstencil = unpackStencil(0, _stencil);
uint32_t ref = (fstencil&BGFX_STENCIL_FUNC_REF_MASK)>>BGFX_STENCIL_FUNC_REF_SHIFT;
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_MASK);
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, ~BGFX_STENCIL_FUNC_REF_MASK);
bx::HashMurmur2A murmur;
murmur.begin();

View File

@ -2647,7 +2647,7 @@ namespace bgfx { namespace d3d12
| BGFX_STATE_PT_MASK
;
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_MASK);
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, ~BGFX_STENCIL_FUNC_REF_MASK);
VertexDecl decl;
bx::memCopy(&decl, _vertexDecls[0], sizeof(VertexDecl) );

View File

@ -1707,7 +1707,7 @@ namespace bgfx { namespace mtl
uint32_t fstencil = unpackStencil(0, _stencil);
uint32_t ref = (fstencil&BGFX_STENCIL_FUNC_REF_MASK)>>BGFX_STENCIL_FUNC_REF_SHIFT;
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_MASK);
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, ~BGFX_STENCIL_FUNC_REF_MASK);
bx::HashMurmur2A murmur;
murmur.begin();

View File

@ -2609,7 +2609,7 @@ VK_IMPORT_DEVICE
| BGFX_STATE_PT_MASK
;
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_MASK);
_stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, ~BGFX_STENCIL_FUNC_REF_MASK);
VertexDecl decl;
bx::memCopy(&decl, &m_vertexDecls[_declIdx], sizeof(VertexDecl) );