summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-03-11 18:31:32 -0600
committerBrian Paul <[email protected]>2012-03-12 11:40:43 -0600
commitf21dfa9d4b7b1f4956a5c0e5926559d00bc19315 (patch)
treee1e35a608a4f68ba6c31494f0b406fd206d90b5a /src/mesa
parent9c53fc593e9d8c735e492ace688c76fcbb0fc687 (diff)
mesa: remove ctx->Driver.ClearColor() hook
The driver Clear() function should just grab the clear color out of the context. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/driverfuncs.c1
-rw-r--r--src/mesa/main/clear.c30
-rw-r--r--src/mesa/main/dd.h3
3 files changed, 0 insertions, 34 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index c0e02970a82..ca120578da9 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -131,7 +131,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->BlendColor = NULL;
driver->BlendEquationSeparate = NULL;
driver->BlendFuncSeparate = NULL;
- driver->ClearColor = NULL;
driver->ClipPlane = NULL;
driver->ColorMask = NULL;
driver->ColorMaterial = NULL;
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index de0a2bb1e2b..7cc204bc58d 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -88,14 +88,6 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
FLUSH_VERTICES(ctx, _NEW_COLOR);
COPY_4V(ctx->Color.ClearColor.f, tmp);
-
- if (ctx->Driver.ClearColor) {
- /* it's OK to call glClearColor in CI mode but it should be a NOP */
- /* we pass the clamped color, since all drivers that need this don't
- * support GL_ARB_color_buffer_float
- */
- (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor);
- }
}
@@ -119,11 +111,6 @@ _mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
FLUSH_VERTICES(ctx, _NEW_COLOR);
COPY_4V(ctx->Color.ClearColor.i, tmp);
-
- /* these should be NOP calls for drivers supporting EXT_texture_integer */
- if (ctx->Driver.ClearColor) {
- ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
- }
}
@@ -147,11 +134,6 @@ _mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
FLUSH_VERTICES(ctx, _NEW_COLOR);
COPY_4V(ctx->Color.ClearColor.ui, tmp);
-
- /* these should be NOP calls for drivers supporting EXT_texture_integer */
- if (ctx->Driver.ClearColor) {
- ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
- }
}
@@ -365,14 +347,10 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
clearSave = ctx->Color.ClearColor;
/* set color */
COPY_4V(ctx->Color.ClearColor.i, value);
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
/* clear buffer(s) */
ctx->Driver.Clear(ctx, mask);
/* restore color */
ctx->Color.ClearColor = clearSave;
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, clearSave);
}
}
break;
@@ -435,14 +413,10 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
clearSave = ctx->Color.ClearColor;
/* set color */
COPY_4V(ctx->Color.ClearColor.ui, value);
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
/* clear buffer(s) */
ctx->Driver.Clear(ctx, mask);
/* restore color */
ctx->Color.ClearColor = clearSave;
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, clearSave);
}
}
break;
@@ -537,14 +511,10 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
clearSave = ctx->Color.ClearColor;
/* set color */
COPY_4V_CAST(ctx->Color.ClearColor.f, value, GLclampf);
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
/* clear buffer(s) */
ctx->Driver.Clear(ctx, mask);
/* restore color */
ctx->Color.ClearColor = clearSave;
- if (ctx->Driver.ClearColor)
- ctx->Driver.ClearColor(ctx, clearSave);
}
}
break;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 7abf33ddda0..582eb5d492b 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -557,9 +557,6 @@ struct dd_function_table {
void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA);
- /** Specify clear values for the color buffers */
- void (*ClearColor)(struct gl_context *ctx,
- const union gl_color_union color);
/** Specify a plane against which all geometry is clipped */
void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation );
/** Enable and disable writing of frame buffer color components */