diff options
author | Brian Paul <[email protected]> | 2009-12-29 16:30:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-29 20:51:20 -0700 |
commit | 8f6f1124634cf659dde4c75549b84e35505d892d (patch) | |
tree | 2a41c7324530fca4c320fd6b4592bf5df83f51b6 /src/mesa/main/get_gen.py | |
parent | a856d635d300f842e9fa6413b0255bdb64142838 (diff) |
mesa: added infrastructure for GL_EXT_draw_buffers2
Diffstat (limited to 'src/mesa/main/get_gen.py')
-rw-r--r-- | src/mesa/main/get_gen.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 18708be2603..82eacf03146 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -1036,13 +1036,13 @@ StateVars = [ # These are queried via glGetIntegetIndexdvEXT() or glGetIntegeri_v() IndexedStateVars = [ ( "GL_BLEND", GLint, ["((ctx->Color.BlendEnabled >> index) & 1)"], - "ctx->Const.MaxDrawBuffers", None ), + "ctx->Const.MaxDrawBuffers", ["EXT_draw_buffers2"] ), ( "GL_COLOR_WRITEMASK", GLint, [ "ctx->Color.ColorMask[index][RCOMP] ? 1 : 0", "ctx->Color.ColorMask[index][GCOMP] ? 1 : 0", "ctx->Color.ColorMask[index][BCOMP] ? 1 : 0", "ctx->Color.ColorMask[index][ACOMP] ? 1 : 0" ], - "ctx->Const.MaxDrawBuffers", None ), + "ctx->Const.MaxDrawBuffers", ["EXT_draw_buffers2"] ), # XXX more to come... ] @@ -1137,11 +1137,6 @@ def EmitGetFunction(stateVars, returnType, indexed): (name, varType, state, optionalCode, extensions) = state indexMax = 0 print " case " + name + ":" - if indexMax: - print (' if (index >= %s) {' % indexMax) - print (' _mesa_error(ctx, GL_INVALID_VALUE, "gl%s(index=%%u), index", pname);' % function) - print (' }') - if extensions: if len(extensions) == 1: print (' CHECK_EXT1(%s, "%s");' % @@ -1156,6 +1151,11 @@ def EmitGetFunction(stateVars, returnType, indexed): assert len(extensions) == 4 print (' CHECK_EXT4(%s, %s, %s, %s, "%s");' % (extensions[0], extensions[1], extensions[2], extensions[3], function)) + if indexMax: + print (' if (index >= %s) {' % indexMax) + print (' _mesa_error(ctx, GL_INVALID_VALUE, "gl%s(index=%%u), index", pname);' % function) + print (' }') + conversion = ConversionFunc(varType, returnType) if optionalCode: optionalCode = string.replace(optionalCode, "CONVERSION", conversion); |