diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/attrib.c | 15 | ||||
-rw-r--r-- | src/mesa/main/buffers.c | 4 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 6 | ||||
-rw-r--r-- | src/mesa/main/get.c | 15 | ||||
-rw-r--r-- | src/mesa/main/get_gen.py | 10 |
5 files changed, 15 insertions, 35 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 36586758a4f..98173cf7862 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -903,14 +903,13 @@ _mesa_PopAttrib(void) * function, but legal for the later. */ GLboolean multipleBuffers = GL_FALSE; - if (ctx->Extensions.ARB_draw_buffers) { - GLuint i; - for (i = 1; i < ctx->Const.MaxDrawBuffers; i++) { - if (color->DrawBuffer[i] != GL_NONE) { - multipleBuffers = GL_TRUE; - break; - } - } + GLuint i; + + for (i = 1; i < ctx->Const.MaxDrawBuffers; i++) { + if (color->DrawBuffer[i] != GL_NONE) { + multipleBuffers = GL_TRUE; + break; + } } /* Call the API_level functions, not _mesa_drawbuffers() * since we need to do error checking on the pop'd diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index b23d2f612bf..dc415c4f20c 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -289,10 +289,6 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (!ctx->Extensions.ARB_draw_buffers) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffersARB"); - return; - } if (n < 1 || n > (GLsizei) ctx->Const.MaxDrawBuffers) { _mesa_error(ctx, GL_INVALID_VALUE, "glDrawBuffersARB(n)"); return; diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index ec6ba708002..8c9208af70c 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -45,7 +45,7 @@ static const struct { int flag_offset; } default_extensions[] = { { OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) }, - { OFF, "GL_ARB_draw_buffers", F(ARB_draw_buffers) }, + { ON, "GL_ARB_draw_buffers", F(ARB_draw_buffers) }, { OFF, "GL_ARB_fragment_program", F(ARB_fragment_program) }, { OFF, "GL_ARB_fragment_program_shadow", F(ARB_fragment_program_shadow) }, { OFF, "GL_ARB_fragment_shader", F(ARB_fragment_shader) }, @@ -184,7 +184,7 @@ void _mesa_enable_sw_extensions(GLcontext *ctx) { ctx->Extensions.ARB_depth_texture = GL_TRUE; - ctx->Extensions.ARB_draw_buffers = GL_TRUE; + /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ #if FEATURE_ARB_fragment_program ctx->Extensions.ARB_fragment_program = GL_TRUE; ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE; @@ -401,7 +401,7 @@ _mesa_enable_1_5_extensions(GLcontext *ctx) void _mesa_enable_2_0_extensions(GLcontext *ctx) { - ctx->Extensions.ARB_draw_buffers = GL_TRUE; + /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ #if FEATURE_ARB_fragment_shader ctx->Extensions.ARB_fragment_shader = GL_TRUE; #endif diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 613f067caa3..8e04ab9b9db 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1732,15 +1732,12 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition); break; case GL_MAX_DRAW_BUFFERS_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetBooleanv"); params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers); break; case GL_DRAW_BUFFER0_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetBooleanv"); params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]); break; case GL_DRAW_BUFFER1_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetBooleanv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -1752,7 +1749,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) } break; case GL_DRAW_BUFFER2_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetBooleanv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -1764,7 +1760,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) } break; case GL_DRAW_BUFFER3_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetBooleanv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -3563,15 +3558,12 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition); break; case GL_MAX_DRAW_BUFFERS_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetFloatv"); params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers); break; case GL_DRAW_BUFFER0_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetFloatv"); params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]); break; case GL_DRAW_BUFFER1_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetFloatv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -3583,7 +3575,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) } break; case GL_DRAW_BUFFER2_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetFloatv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -3595,7 +3586,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) } break; case GL_DRAW_BUFFER3_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetFloatv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -5394,15 +5384,12 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ctx->VertexProgram.CurrentPosition; break; case GL_MAX_DRAW_BUFFERS_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetIntegerv"); params[0] = ctx->Const.MaxDrawBuffers; break; case GL_DRAW_BUFFER0_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetIntegerv"); params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]); break; case GL_DRAW_BUFFER1_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetIntegerv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -5414,7 +5401,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) } break; case GL_DRAW_BUFFER2_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetIntegerv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { @@ -5426,7 +5412,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) } break; case GL_DRAW_BUFFER3_ARB: - CHECK_EXT1(ARB_draw_buffers, "GetIntegerv"); { GLenum buffer; if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 78ccee90190..83a8f2f786c 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -914,9 +914,9 @@ StateVars = [ # GL_ARB_draw_buffers ( "GL_MAX_DRAW_BUFFERS_ARB", GLint, - ["ctx->Const.MaxDrawBuffers"], "", ["ARB_draw_buffers"] ), + ["ctx->Const.MaxDrawBuffers"], "", None ), ( "GL_DRAW_BUFFER0_ARB", GLenum, - ["ctx->DrawBuffer->ColorDrawBuffer[0]"], "", ["ARB_draw_buffers"] ), + ["ctx->DrawBuffer->ColorDrawBuffer[0]"], "", None ), ( "GL_DRAW_BUFFER1_ARB", GLenum, ["buffer"], """GLenum buffer; @@ -924,7 +924,7 @@ StateVars = [ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); return; } - buffer = ctx->DrawBuffer->ColorDrawBuffer[1];""", ["ARB_draw_buffers"] ), + buffer = ctx->DrawBuffer->ColorDrawBuffer[1];""", None ), ( "GL_DRAW_BUFFER2_ARB", GLenum, ["buffer"], """GLenum buffer; @@ -932,7 +932,7 @@ StateVars = [ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); return; } - buffer = ctx->DrawBuffer->ColorDrawBuffer[2];""", ["ARB_draw_buffers"] ), + buffer = ctx->DrawBuffer->ColorDrawBuffer[2];""", None ), ( "GL_DRAW_BUFFER3_ARB", GLenum, ["buffer"], """GLenum buffer; @@ -940,7 +940,7 @@ StateVars = [ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); return; } - buffer = ctx->DrawBuffer->ColorDrawBuffer[3];""", ["ARB_draw_buffers"] ), + buffer = ctx->DrawBuffer->ColorDrawBuffer[3];""", None ), # XXX Add more GL_DRAW_BUFFERn_ARB entries as needed in the future # GL_OES_read_format |