Chip Davis : d3d11: Introduce a function to convert D3D11 blend ops to wined3d.

Alexandre Julliard julliard at winehq.org
Mon Apr 6 15:53:22 CDT 2020


Module: wine
Branch: master
Commit: 07832261b5001cc7e581cfc17f65eb0c63f6e2f3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=07832261b5001cc7e581cfc17f65eb0c63f6e2f3

Author: Chip Davis <cdavis at codeweavers.com>
Date:   Fri Apr  3 11:06:03 2020 -0500

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

Signed-off-by: Chip Davis <cdavis at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 da2768880f..eb3080d55c 100644
--- a/dlls/d3d11/state.c
+++ b/dlls/d3d11/state.c
@@ -308,6 +308,11 @@ static enum wined3d_blend wined3d_blend_from_d3d11(D3D11_BLEND factor)
     return (enum wined3d_blend)factor;
 }
 
+static enum wined3d_blend_op wined3d_blend_op_from_d3d11(D3D11_BLEND_OP op)
+{
+    return (enum wined3d_blend_op)op;
+}
+
 HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC *desc,
         struct d3d_blend_state **state)
 {
@@ -392,10 +397,10 @@ HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC
         wined3d_desc.rt[i].enable = desc->RenderTarget[i].BlendEnable;
         wined3d_desc.rt[i].src = wined3d_blend_from_d3d11(desc->RenderTarget[i].SrcBlend);
         wined3d_desc.rt[i].dst = wined3d_blend_from_d3d11(desc->RenderTarget[i].DestBlend);
-        wined3d_desc.rt[i].op = desc->RenderTarget[i].BlendOp;
+        wined3d_desc.rt[i].op = wined3d_blend_op_from_d3d11(desc->RenderTarget[i].BlendOp);
         wined3d_desc.rt[i].src_alpha = wined3d_blend_from_d3d11(desc->RenderTarget[i].SrcBlendAlpha);
         wined3d_desc.rt[i].dst_alpha = wined3d_blend_from_d3d11(desc->RenderTarget[i].DestBlendAlpha);
-        wined3d_desc.rt[i].op_alpha = desc->RenderTarget[i].BlendOpAlpha;
+        wined3d_desc.rt[i].op_alpha = wined3d_blend_op_from_d3d11(desc->RenderTarget[i].BlendOpAlpha);
         wined3d_desc.rt[i].writemask = desc->RenderTarget[i].RenderTargetWriteMask;
     }
 




More information about the wine-cvs mailing list