d3d11: Set blend states only when blending is enabled.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
42fcf20221
commit
022867e5b1
|
@ -653,16 +653,22 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|
|||
FIXME("Per-rendertarget blend not implemented.\n");
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ALPHABLENDENABLE,
|
||||
desc->RenderTarget[0].BlendEnable);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SRCBLEND, desc->RenderTarget[0].SrcBlend);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DESTBLEND, desc->RenderTarget[0].DestBlend);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BLENDOP, desc->RenderTarget[0].BlendOp);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SEPARATEALPHABLENDENABLE, TRUE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SRCBLENDALPHA,
|
||||
desc->RenderTarget[0].SrcBlendAlpha);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DESTBLENDALPHA,
|
||||
desc->RenderTarget[0].DestBlendAlpha);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BLENDOPALPHA,
|
||||
desc->RenderTarget[0].BlendOpAlpha);
|
||||
if (desc->RenderTarget[0].BlendEnable)
|
||||
{
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SRCBLEND,
|
||||
desc->RenderTarget[0].SrcBlend);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DESTBLEND,
|
||||
desc->RenderTarget[0].DestBlend);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BLENDOP,
|
||||
desc->RenderTarget[0].BlendOp);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SEPARATEALPHABLENDENABLE, TRUE);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SRCBLENDALPHA,
|
||||
desc->RenderTarget[0].SrcBlendAlpha);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DESTBLENDALPHA,
|
||||
desc->RenderTarget[0].DestBlendAlpha);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BLENDOPALPHA,
|
||||
desc->RenderTarget[0].BlendOpAlpha);
|
||||
}
|
||||
FIXME("Color mask > 3 not implemented.\n");
|
||||
wined3d_device_set_render_state(device->wined3d_device,
|
||||
WINED3D_RS_COLORWRITEENABLE, desc->RenderTarget[0].RenderTargetWriteMask);
|
||||
|
|
Loading…
Reference in New Issue