From b9f63c277ac84f7b6598cb4e908033514d379171 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 24 Feb 2010 19:00:50 -0800 Subject: [PATCH] mesa: Remove checks of Visual.rgbMode in Get paths Signed-off-by: Ian Romanick --- src/mesa/main/get.c | 16 ++++++++-------- src/mesa/main/get_gen.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 60fef552c48..e390d29757c 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -391,7 +391,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = !ctx->DrawBuffer->Visual.rgbMode; + params[0] = GL_FALSE; break; case GL_INDEX_OFFSET: params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset); @@ -827,7 +827,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = ctx->Transform.RescaleNormals; break; case GL_RGBA_MODE: - params[0] = ctx->DrawBuffer->Visual.rgbMode; + params[0] = GL_TRUE; break; case GL_SCISSOR_BOX: params[0] = INT_TO_BOOLEAN(ctx->Scissor.X); @@ -2260,7 +2260,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = (GLfloat)(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_FLOAT(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = (GLfloat)(ctx->Pixel.IndexOffset); @@ -2696,7 +2696,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_FLOAT(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = (GLfloat)(ctx->Scissor.X); @@ -4129,7 +4129,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ctx->Color.ClearIndex; break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = ctx->Pixel.IndexOffset; @@ -4565,7 +4565,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = ctx->Scissor.X; @@ -5999,7 +5999,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = (GLint64)(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_INT64(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT64(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = (GLint64)(ctx->Pixel.IndexOffset); @@ -6435,7 +6435,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = BOOLEAN_TO_INT64(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT64(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = (GLint64)(ctx->Scissor.X); diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 64aa2aca262..17ea1e4ae64 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -231,7 +231,7 @@ StateVars = [ ( "GL_INDEX_BITS", GLint, ["ctx->DrawBuffer->Visual.indexBits"], "", None ), ( "GL_INDEX_CLEAR_VALUE", GLint, ["ctx->Color.ClearIndex"], "", None ), - ( "GL_INDEX_MODE", GLboolean, ["!ctx->DrawBuffer->Visual.rgbMode"], + ( "GL_INDEX_MODE", GLboolean, ["GL_FALSE"], "", None ), ( "GL_INDEX_OFFSET", GLint, ["ctx->Pixel.IndexOffset"], "", None ), ( "GL_INDEX_SHIFT", GLint, ["ctx->Pixel.IndexShift"], "", None ), @@ -410,7 +410,7 @@ StateVars = [ ( "GL_RENDER_MODE", GLenum, ["ctx->RenderMode"], "", None ), ( "GL_RESCALE_NORMAL", GLboolean, ["ctx->Transform.RescaleNormals"], "", None ), - ( "GL_RGBA_MODE", GLboolean, ["ctx->DrawBuffer->Visual.rgbMode"], + ( "GL_RGBA_MODE", GLboolean, ["GL_TRUE"], "", None ), ( "GL_SCISSOR_BOX", GLint, ["ctx->Scissor.X", -- 2.30.2