[PATCH] wined3d: Add dual-source blend factors.

Henri Verbeet hverbeet at codeweavers.com
Tue Feb 7 05:45:28 CST 2017


From: Guillaume Charifi <guillaume.charifi at sfr.fr>

Signed-off-by: Guillaume Charifi <guillaume.charifi at sfr.fr>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/state.c   | 8 ++++++++
 include/wine/wined3d.h | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 4b21c57..e469414 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -406,6 +406,14 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo
             return GL_CONSTANT_COLOR_EXT;
         case WINED3D_BLEND_INVBLENDFACTOR:
             return GL_ONE_MINUS_CONSTANT_COLOR_EXT;
+        case WINED3D_BLEND_SRC1COLOR:
+            return GL_SRC1_COLOR;
+        case WINED3D_BLEND_INVSRC1COLOR:
+            return GL_ONE_MINUS_SRC1_COLOR;
+        case WINED3D_BLEND_SRC1ALPHA:
+            return GL_SRC1_ALPHA;
+        case WINED3D_BLEND_INVSRC1ALPHA:
+            return GL_ONE_MINUS_SRC1_ALPHA;
         default:
             FIXME("Unhandled blend factor %#x.\n", factor);
             return GL_NONE;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 8b8305b..7788e90 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -400,6 +400,10 @@ enum wined3d_blend
     WINED3D_BLEND_BOTHINVSRCALPHA           = 13,
     WINED3D_BLEND_BLENDFACTOR               = 14,
     WINED3D_BLEND_INVBLENDFACTOR            = 15,
+    WINED3D_BLEND_SRC1COLOR                 = 16,
+    WINED3D_BLEND_INVSRC1COLOR              = 17,
+    WINED3D_BLEND_SRC1ALPHA                 = 18,
+    WINED3D_BLEND_INVSRC1ALPHA              = 19,
 };
 
 enum wined3d_blend_op
-- 
2.1.4




More information about the wine-patches mailing list