Commit 022867e5 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Set blend states only when blending is enabled.

parent 42fcf202
......@@ -653,9 +653,14 @@ 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);
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);
......@@ -663,6 +668,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment