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

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chip Davis 2020-04-08 01:11:37 -05:00 committed by Alexandre Julliard
parent c939699dea
commit 3d336d4326
1 changed files with 7 additions and 2 deletions

View File

@ -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;