[PATCH 2/2] wined3d: Add support for SRCCOLOR1, INVSRCCOLOR1, SRCALPHA1 and INVSRCALPHA1 blend modes.

Guillaume Charifi guillaume.charifi at sfr.fr
Sat Feb 4 05:33:17 CST 2017


Overrides http://source.winehq.org/patches/data/129692

Signed-off-by: Guillaume Charifi <guillaume.charifi at sfr.fr>
---
  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 96da4ad..b95004d 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_SRCCOLOR1:
+            return GL_SRC1_COLOR;
+        case WINED3D_BLEND_INVSRCCOLOR1:
+            return GL_ONE_MINUS_SRC1_COLOR;
+        case WINED3D_BLEND_SRCALPHA1:
+            return GL_SRC1_ALPHA;
+        case WINED3D_BLEND_INVSRCALPHA1:
+            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 4b0ea06..0b801eb 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_SRCCOLOR1                 = 16,
+    WINED3D_BLEND_INVSRCCOLOR1              = 17,
+    WINED3D_BLEND_SRCALPHA1                 = 18,
+    WINED3D_BLEND_INVSRCALPHA1              = 19,
  };
   enum wined3d_blend_op
-- 
2.9.3



More information about the wine-patches mailing list