Signed-off-by: Chip Davis cdavis@codeweavers.com --- v2: Fix backwards description. --- dlls/d3d11/state.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index a4a3021db96..c76595752f9 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -240,6 +240,11 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D1
/* ID3D10BlendState methods */
+static D3D10_BLEND d3d10_blend_from_d3d11(D3D11_BLEND factor) +{ + return (D3D10_BLEND)factor; +} + static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState1 *iface, D3D10_BLEND_DESC *desc) { struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface); @@ -249,11 +254,11 @@ static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState1 *iface TRACE("iface %p, desc %p.\n", iface, desc);
desc->AlphaToCoverageEnable = d3d11_desc->AlphaToCoverageEnable; - desc->SrcBlend = d3d11_desc->RenderTarget[0].SrcBlend; - desc->DestBlend = d3d11_desc->RenderTarget[0].DestBlend; + 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->SrcBlendAlpha = d3d11_desc->RenderTarget[0].SrcBlendAlpha; - desc->DestBlendAlpha = d3d11_desc->RenderTarget[0].DestBlendAlpha; + 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; for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) {
Signed-off-by: Chip Davis cdavis@codeweavers.com --- v2: Fix backwards description. --- dlls/d3d11/state.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index c76595752f9..32ef44091c4 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -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;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=69119
Your paranoid android.
=== debiant (32 bit report) ===
d3d11: d3d11.c:16859: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com