summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/clear.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-02-24 18:58:38 -0800
committerIan Romanick <[email protected]>2010-03-03 12:37:04 -0800
commit22a96f305898b5d1aa26809c7156a01686eb9bf0 (patch)
treea6a863d1bd28f639f92467364d4d4687f4367413 /src/mesa/main/clear.c
parentfcf438e9e03f6e75bca4a49ad372fe7c4b1abbf8 (diff)
mesa: Remove checks of Visual.rgbMode
This must always be true now, so there is no reason to check it. Ever. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/clear.c')
-rw-r--r--src/mesa/main/clear.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index 8085bedf1c1..e76ab5527b0 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -51,11 +51,6 @@ _mesa_ClearIndex( GLfloat c )
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ClearIndex = (GLuint) c;
-
- if (!ctx->Visual.rgbMode && ctx->Driver.ClearIndex) {
- /* it's OK to call glClearIndex in RGBA mode but it should be a NOP */
- (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex );
- }
}
#endif
@@ -92,7 +87,7 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
FLUSH_VERTICES(ctx, _NEW_COLOR);
COPY_4V(ctx->Color.ClearColor, tmp);
- if (ctx->Visual.rgbMode && ctx->Driver.ClearColor) {
+ if (ctx->Driver.ClearColor) {
/* it's OK to call glClearColor in CI mode but it should be a NOP */
(*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor);
}
@@ -261,11 +256,6 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferiv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -342,11 +332,6 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferuiv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -401,11 +386,6 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -480,11 +460,6 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfi()");
- return;
- }
-
if (buffer != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)",
_mesa_lookup_enum_by_nr(buffer));