Henri Verbeet : wined3d: Fix the EXT_blend_subtract extension definitions.
Alexandre Julliard
julliard at winehq.org
Fri Apr 1 09:40:59 CDT 2011
Module: wine
Branch: master
Commit: 97a5336ca9ad143928f6c2aac9a06be0047d90ff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=97a5336ca9ad143928f6c2aac9a06be0047d90ff
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 31 20:04:45 2011 +0200
wined3d: Fix the EXT_blend_subtract extension definitions.
---
dlls/wined3d/directx.c | 1 +
dlls/wined3d/state.c | 20 ++++++++++----------
dlls/wined3d/wined3d_gl.h | 8 ++++++++
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 43f445e..45b3832 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -105,6 +105,7 @@ static const struct {
{"GL_EXT_blend_equation_separate", EXT_BLEND_EQUATION_SEPARATE, 0 },
{"GL_EXT_blend_func_separate", EXT_BLEND_FUNC_SEPARATE, 0 },
{"GL_EXT_blend_minmax", EXT_BLEND_MINMAX, 0 },
+ {"GL_EXT_blend_subtract", EXT_BLEND_SUBTRACT, 0 },
{"GL_EXT_depth_bounds_test", EXT_DEPTH_BOUNDS_TEST, 0 },
{"GL_EXT_draw_buffers2", EXT_DRAW_BUFFERS2, 0 },
{"GL_EXT_fog_coord", EXT_FOG_COORD, 0 },
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index ad9374d..85e61de 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -650,11 +650,11 @@ static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, st
switch (stateblock->state.render_states[WINED3DRS_BLENDOP])
{
- case WINED3DBLENDOP_ADD : blendEquation = GL_FUNC_ADD_EXT; break;
- case WINED3DBLENDOP_SUBTRACT : blendEquation = GL_FUNC_SUBTRACT; break;
- case WINED3DBLENDOP_REVSUBTRACT : blendEquation = GL_FUNC_REVERSE_SUBTRACT; break;
- case WINED3DBLENDOP_MIN : blendEquation = GL_MIN_EXT; break;
- case WINED3DBLENDOP_MAX : blendEquation = GL_MAX_EXT; break;
+ case WINED3DBLENDOP_ADD: blendEquation = GL_FUNC_ADD_EXT; break;
+ case WINED3DBLENDOP_SUBTRACT: blendEquation = GL_FUNC_SUBTRACT_EXT; break;
+ case WINED3DBLENDOP_REVSUBTRACT: blendEquation = GL_FUNC_REVERSE_SUBTRACT_EXT; break;
+ case WINED3DBLENDOP_MIN: blendEquation = GL_MIN_EXT; break;
+ case WINED3DBLENDOP_MAX: blendEquation = GL_MAX_EXT; break;
default:
FIXME("Unrecognized/Unhandled D3DBLENDOP value %#x.\n",
stateblock->state.render_states[WINED3DRS_BLENDOP]);
@@ -662,11 +662,11 @@ static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, st
switch (stateblock->state.render_states[WINED3DRS_BLENDOPALPHA])
{
- case WINED3DBLENDOP_ADD : blendEquationAlpha = GL_FUNC_ADD_EXT; break;
- case WINED3DBLENDOP_SUBTRACT : blendEquationAlpha = GL_FUNC_SUBTRACT; break;
- case WINED3DBLENDOP_REVSUBTRACT : blendEquationAlpha = GL_FUNC_REVERSE_SUBTRACT; break;
- case WINED3DBLENDOP_MIN : blendEquationAlpha = GL_MIN_EXT; break;
- case WINED3DBLENDOP_MAX : blendEquationAlpha = GL_MAX_EXT; break;
+ case WINED3DBLENDOP_ADD: blendEquationAlpha = GL_FUNC_ADD_EXT; break;
+ case WINED3DBLENDOP_SUBTRACT: blendEquationAlpha = GL_FUNC_SUBTRACT_EXT; break;
+ case WINED3DBLENDOP_REVSUBTRACT: blendEquationAlpha = GL_FUNC_REVERSE_SUBTRACT_EXT; break;
+ case WINED3DBLENDOP_MIN: blendEquationAlpha = GL_MIN_EXT; break;
+ case WINED3DBLENDOP_MAX: blendEquationAlpha = GL_MAX_EXT; break;
default:
FIXME("Unrecognized/Unhandled D3DBLENDOP value %#x\n",
stateblock->state.render_states[WINED3DRS_BLENDOPALPHA]);
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index fc362a7..3e10d12 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -1786,6 +1786,7 @@ typedef enum wined3d_gl_extension
EXT_BLEND_EQUATION_SEPARATE,
EXT_BLEND_FUNC_SEPARATE,
EXT_BLEND_MINMAX,
+ EXT_BLEND_SUBTRACT,
EXT_DRAW_BUFFERS2,
EXT_DEPTH_BOUNDS_TEST,
EXT_FOG_COORD,
@@ -3006,6 +3007,13 @@ typedef void (WINE_GLAPI *PGLFNBLENDFUNCSEPARATEEXTPROC)(GLenum sfactorRGB, GLen
#endif
typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONEXTPROC)(GLenum mode);
+/* GL_EXT_blend_subtract */
+#ifndef GL_EXT_blend_subtract
+#define GL_EXT_blend_subtract 1
+#define GL_FUNC_SUBTRACT_EXT 0x800a
+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800b
+#endif
+
/* GL_EXT_depth_bounds_test */
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
More information about the wine-cvs
mailing list