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

[d3d10] Fix null pBlendStateDesc being dereferenced on def. desc

This commit is contained in:
Joshua Ashton 2019-02-27 20:24:50 +00:00 committed by Philip Rebohle
parent 2454041903
commit ccf24db428

View File

@ -515,6 +515,8 @@ namespace dxvk {
InitReturnPtr(ppBlendState); InitReturnPtr(ppBlendState);
D3D11_BLEND_DESC d3d11Desc; D3D11_BLEND_DESC d3d11Desc;
if (pBlendStateDesc != nullptr) {
d3d11Desc.AlphaToCoverageEnable = pBlendStateDesc->AlphaToCoverageEnable; d3d11Desc.AlphaToCoverageEnable = pBlendStateDesc->AlphaToCoverageEnable;
d3d11Desc.IndependentBlendEnable = TRUE; d3d11Desc.IndependentBlendEnable = TRUE;
@ -528,6 +530,7 @@ namespace dxvk {
d3d11Desc.RenderTarget[i].BlendOpAlpha = D3D11_BLEND_OP(pBlendStateDesc->BlendOpAlpha); d3d11Desc.RenderTarget[i].BlendOpAlpha = D3D11_BLEND_OP(pBlendStateDesc->BlendOpAlpha);
d3d11Desc.RenderTarget[i].RenderTargetWriteMask = pBlendStateDesc->RenderTargetWriteMask[i]; d3d11Desc.RenderTarget[i].RenderTargetWriteMask = pBlendStateDesc->RenderTargetWriteMask[i];
} }
}
ID3D11BlendState* d3d11BlendState = nullptr; ID3D11BlendState* d3d11BlendState = nullptr;
HRESULT hr = m_device->CreateBlendState(&d3d11Desc, HRESULT hr = m_device->CreateBlendState(&d3d11Desc,