mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-29 12:15:30 +00:00
D3D11/D3D12/VK/WebGPU: Fixed independent blend _rgba. (#3736)
This commit is contained in:
@@ -2536,6 +2536,7 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
const VertexLayout* layouts[1] = { &m_vertexLayouts[_blitter.m_vb->layoutHandle.idx] };
|
||||
ID3D12PipelineState* pso = getPipelineState(state
|
||||
, 0
|
||||
, packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT)
|
||||
, 1
|
||||
, layouts
|
||||
@@ -3384,6 +3385,7 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
ID3D12PipelineState* getPipelineState(
|
||||
uint64_t _state
|
||||
, uint32_t _rgba
|
||||
, uint64_t _stencil
|
||||
, uint8_t _numStreams
|
||||
, const VertexLayout** _layouts
|
||||
@@ -3429,6 +3431,7 @@ namespace bgfx { namespace d3d12
|
||||
bx::HashMurmur2A murmur;
|
||||
murmur.begin();
|
||||
murmur.add(_state);
|
||||
murmur.add(!!(BGFX_STATE_BLEND_INDEPENDENT & _state) ? _rgba : 0);
|
||||
murmur.add(_stencil);
|
||||
murmur.add(program.m_vsh->m_hash);
|
||||
murmur.add(program.m_vsh->m_attrMask, sizeof(program.m_vsh->m_attrMask) );
|
||||
@@ -3491,7 +3494,7 @@ namespace bgfx { namespace d3d12
|
||||
desc.StreamOutput.NumStrides = 0;
|
||||
desc.StreamOutput.RasterizedStream = 0;
|
||||
|
||||
setBlendState(desc.BlendState, _state);
|
||||
setBlendState(desc.BlendState, _state, _rgba);
|
||||
desc.SampleMask = UINT32_MAX;
|
||||
setRasterizerState(desc.RasterizerState, _state);
|
||||
setDepthStencilState(desc.DepthStencilState, _state, _stencil);
|
||||
@@ -7585,6 +7588,7 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
ID3D12PipelineState* pso = getPipelineState(
|
||||
state
|
||||
, draw.m_rgba
|
||||
, draw.m_stencil
|
||||
, numStreams
|
||||
, layouts
|
||||
|
||||
Reference in New Issue
Block a user