summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/clear.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-03-11 18:31:32 -0600
committerBrian Paul <brianp@vmware.com>2012-03-12 11:40:43 -0600
commitf21dfa9d4b7b1f4956a5c0e5926559d00bc19315 (patch)
treee1e35a608a4f68ba6c31494f0b406fd206d90b5a /src/mesa/main/clear.c
parent9c53fc593e9d8c735e492ace688c76fcbb0fc687 (diff)
downloadexternal_mesa3d-f21dfa9d4b7b1f4956a5c0e5926559d00bc19315.zip
external_mesa3d-f21dfa9d4b7b1f4956a5c0e5926559d00bc19315.tar.gz
external_mesa3d-f21dfa9d4b7b1f4956a5c0e5926559d00bc19315.tar.bz2
mesa: remove ctx->Driver.ClearColor() hook
The driver Clear() function should just grab the clear color out of the context. Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/clear.c')
-rw-r--r--src/mesa/main/clear.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index de0a2bb..7cc204b 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;