Henri Verbeet : wined3d: Fix the EXT_blend_minmax extension definitions.
Alexandre Julliard
julliard at winehq.org
Fri Apr 1 09:40:59 CDT 2011
Module: wine
Branch: master
Commit: f8507d60618c13460e4290cc7c6dad80449e3a04
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8507d60618c13460e4290cc7c6dad80449e3a04
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 31 20:04:43 2011 +0200
wined3d: Fix the EXT_blend_minmax extension definitions.
---
dlls/wined3d/state.c | 16 ++++++++--------
dlls/wined3d/wined3d_gl.h | 21 ++++++++++++++++-----
2 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 182882d..a37f8ce 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -637,8 +637,8 @@ static void state_blendop_w(DWORD state, struct wined3d_stateblock *stateblock,
static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
- int blendEquation = GL_FUNC_ADD;
- int blendEquationAlpha = GL_FUNC_ADD;
+ int blendEquation = GL_FUNC_ADD_EXT;
+ int blendEquationAlpha = GL_FUNC_ADD_EXT;
/* BLENDOPALPHA requires GL_EXT_blend_equation_separate, so make sure it is around */
if (stateblock->state.render_states[WINED3DRS_BLENDOPALPHA]
@@ -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; break;
+ 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; break;
- case WINED3DBLENDOP_MAX : blendEquation = GL_MAX; 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; break;
+ 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; break;
- case WINED3DBLENDOP_MAX : blendEquationAlpha = GL_MAX; 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 fca79af..4c20e70 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -2984,6 +2984,16 @@ typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLe
typedef void (WINE_GLAPI *PGLFNBLENDFUNCSEPARATEEXTPROC)(GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorAlpha, GLenum dfactorAlpha);
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#define GL_FUNC_ADD_EXT 0x8006
+#define GL_MIN_EXT 0x8007
+#define GL_MAX_EXT 0x8008
+#define GL_BLEND_EQUATION_EXT 0x8009
+#endif
+typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONEXTPROC)(GLenum mode);
+
/* GL_EXT_depth_bounds_test */
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
@@ -3892,11 +3902,6 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSWAPINTERVALEXTPROC)(int interval);
glFramebufferTextureLayerARB, ARB_GEOMETRY_SHADER4, NULL) \
USE_GL_FUNC(PGLFNFRAMEBUFFERTEXTUREFACEARBPROC, \
glFramebufferTextureFaceARB, ARB_GEOMETRY_SHADER4, NULL) \
- /* GL_ARB_imaging, GL_EXT_blend_minmax */ \
- USE_GL_FUNC(PGLFNBLENDCOLORPROC, \
- glBlendColorEXT, EXT_BLEND_COLOR, NULL) \
- USE_GL_FUNC(PGLFNBLENDEQUATIONPROC, \
- glBlendEquationEXT, EXT_BLEND_MINMAX, NULL) \
/* GL_ARB_map_buffer_range */ \
USE_GL_FUNC(PGLFNMAPBUFFERRANGEPROC, \
glMapBufferRange, ARB_MAP_BUFFER_RANGE, NULL) \
@@ -4231,12 +4236,18 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSWAPINTERVALEXTPROC)(int interval);
glStencilOpSeparateATI, ATI_SEPARATE_STENCIL, NULL) \
USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, \
glStencilFuncSeparateATI, ATI_SEPARATE_STENCIL, NULL) \
+ /* GL_EXT_blend_color */ \
+ USE_GL_FUNC(PGLFNBLENDCOLORPROC, \
+ glBlendColorEXT, EXT_BLEND_COLOR, NULL) \
/* GL_EXT_blend_equation_separate */ \
USE_GL_FUNC(PGLFNBLENDFUNCSEPARATEEXTPROC, \
glBlendFuncSeparateEXT, EXT_BLEND_FUNC_SEPARATE, NULL) \
/* GL_EXT_blend_func_separate */ \
USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEEXTPROC, \
glBlendEquationSeparateEXT, EXT_BLEND_EQUATION_SEPARATE, NULL) \
+ /* GL_EXT_blend_minmax */ \
+ USE_GL_FUNC(PGLFNBLENDEQUATIONEXTPROC, \
+ glBlendEquationEXT, EXT_BLEND_MINMAX, NULL) \
/* GL_EXT_depth_bounds_test */ \
USE_GL_FUNC(PGLFNDEPTHBOUNDSEXTPROC, \
glDepthBoundsEXT, EXT_DEPTH_BOUNDS_TEST, NULL) \
More information about the wine-cvs
mailing list