Commit 3d336d43 authored by Chip Davis's avatar Chip Davis Committed by Alexandre Julliard

d3d11: Introduce a function to convert D3D11 blend ops to D3D10.

parent c939699d
......@@ -245,6 +245,11 @@ static D3D10_BLEND d3d10_blend_from_d3d11(D3D11_BLEND factor)
return (D3D10_BLEND)factor;
}
static D3D10_BLEND_OP d3d10_blend_op_from_d3d11(D3D11_BLEND_OP op)
{
return (D3D10_BLEND_OP)op;
}
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState1 *iface, D3D10_BLEND_DESC *desc)
{
struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
......@@ -256,10 +261,10 @@ static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState1 *iface
desc->AlphaToCoverageEnable = d3d11_desc->AlphaToCoverageEnable;
desc->SrcBlend = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].SrcBlend);
desc->DestBlend = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].DestBlend);
desc->BlendOp = d3d11_desc->RenderTarget[0].BlendOp;
desc->BlendOp = d3d10_blend_op_from_d3d11(d3d11_desc->RenderTarget[0].BlendOp);
desc->SrcBlendAlpha = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].SrcBlendAlpha);
desc->DestBlendAlpha = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].DestBlendAlpha);
desc->BlendOpAlpha = d3d11_desc->RenderTarget[0].BlendOpAlpha;
desc->BlendOpAlpha = d3d10_blend_op_from_d3d11(d3d11_desc->RenderTarget[0].BlendOpAlpha);
for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
{
desc->BlendEnable[i] = d3d11_desc->RenderTarget[i].BlendEnable;
......
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