aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get_gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/get_gen.py')
-rw-r--r--src/mesa/main/get_gen.py54
1 files changed, 34 insertions, 20 deletions
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index b3e6bc58559..8259972daa4 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -54,10 +54,14 @@ TypeStrings = {
# - optional extension to check, or None (XXX this should be a list!)
#
StateVars = [
- ( "GL_ACCUM_RED_BITS", GLint, ["ctx->Visual.accumRedBits"], "", None ),
- ( "GL_ACCUM_GREEN_BITS", GLint, ["ctx->Visual.accumGreenBits"], "", None ),
- ( "GL_ACCUM_BLUE_BITS", GLint, ["ctx->Visual.accumBlueBits"], "", None ),
- ( "GL_ACCUM_ALPHA_BITS", GLint, ["ctx->Visual.accumAlphaBits"], "", None ),
+ ( "GL_ACCUM_RED_BITS", GLint, ["ctx->DrawBuffer->Visual.accumRedBits"],
+ "", None ),
+ ( "GL_ACCUM_GREEN_BITS", GLint, ["ctx->DrawBuffer->Visual.accumGreenBits"],
+ "", None ),
+ ( "GL_ACCUM_BLUE_BITS", GLint, ["ctx->DrawBuffer->Visual.accumBlueBits"],
+ "", None ),
+ ( "GL_ACCUM_ALPHA_BITS", GLint, ["ctx->DrawBuffer->Visual.accumAlphaBits"],
+ "", None ),
( "GL_ACCUM_CLEAR_VALUE", GLfloatN,
[ "ctx->Accum.ClearColor[0]",
"ctx->Accum.ClearColor[1]",
@@ -65,14 +69,16 @@ StateVars = [
"ctx->Accum.ClearColor[3]" ],
"", None ),
( "GL_ALPHA_BIAS", GLfloat, ["ctx->Pixel.AlphaBias"], "", None ),
- ( "GL_ALPHA_BITS", GLint, ["ctx->Visual.alphaBits"], "", None ),
+ ( "GL_ALPHA_BITS", GLint, ["ctx->DrawBuffer->Visual.alphaBits"],
+ "", None ),
( "GL_ALPHA_SCALE", GLfloat, ["ctx->Pixel.AlphaScale"], "", None ),
( "GL_ALPHA_TEST", GLboolean, ["ctx->Color.AlphaEnabled"], "", None ),
( "GL_ALPHA_TEST_FUNC", GLenum, ["ctx->Color.AlphaFunc"], "", None ),
( "GL_ALPHA_TEST_REF", GLfloatN, ["ctx->Color.AlphaRef"], "", None ),
( "GL_ATTRIB_STACK_DEPTH", GLint, ["ctx->AttribStackDepth"], "", None ),
( "GL_AUTO_NORMAL", GLboolean, ["ctx->Eval.AutoNormal"], "", None ),
- ( "GL_AUX_BUFFERS", GLint, ["ctx->Visual.numAuxBuffers"], "", None ),
+ ( "GL_AUX_BUFFERS", GLint, ["ctx->DrawBuffer->Visual.numAuxBuffers"],
+ "", None ),
( "GL_BLEND", GLboolean, ["ctx->Color.BlendEnabled"], "", None ),
( "GL_BLEND_DST", GLenum, ["ctx->Color.BlendDstRGB"], "", None ),
( "GL_BLEND_SRC", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ),
@@ -89,7 +95,7 @@ StateVars = [
"ctx->Color.BlendColor[2]",
"ctx->Color.BlendColor[3]"], "", None ),
( "GL_BLUE_BIAS", GLfloat, ["ctx->Pixel.BlueBias"], "", None ),
- ( "GL_BLUE_BITS", GLint, ["ctx->Visual.blueBits"], "", None ),
+ ( "GL_BLUE_BITS", GLint, ["ctx->DrawBuffer->Visual.blueBits"], "", None ),
( "GL_BLUE_SCALE", GLfloat, ["ctx->Pixel.BlueScale"], "", None ),
( "GL_CLIENT_ATTRIB_STACK_DEPTH", GLint,
["ctx->ClientAttribStackDepth"], "", None ),
@@ -165,7 +171,8 @@ StateVars = [
"ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]"],
"const GLuint texUnit = ctx->Texture.CurrentUnit;", None ),
( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ),
- ( "GL_DEPTH_BITS", GLint, ["ctx->Visual.depthBits"], "", None ),
+ ( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"],
+ "", None ),
( "GL_DEPTH_CLEAR_VALUE", GLfloat, ["ctx->Depth.Clear"], "", None ),
( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ),
( "GL_DEPTH_RANGE", GLfloatN,
@@ -174,7 +181,8 @@ StateVars = [
( "GL_DEPTH_TEST", GLboolean, ["ctx->Depth.Test"], "", None ),
( "GL_DEPTH_WRITEMASK", GLboolean, ["ctx->Depth.Mask"], "", None ),
( "GL_DITHER", GLboolean, ["ctx->Color.DitherFlag"], "", None ),
- ( "GL_DOUBLEBUFFER", GLboolean, ["ctx->Visual.doubleBufferMode"], "", None ),
+ ( "GL_DOUBLEBUFFER", GLboolean,
+ ["ctx->DrawBuffer->Visual.doubleBufferMode"], "", None ),
( "GL_DRAW_BUFFER", GLenum, ["ctx->Color.DrawBuffer[0]"], "", None ),
( "GL_EDGE_FLAG", GLboolean, ["ctx->Current.EdgeFlag"],
"FLUSH_CURRENT(ctx, 0);", None ),
@@ -194,11 +202,14 @@ StateVars = [
( "GL_FOG_START", GLfloat, ["ctx->Fog.Start"], "", None ),
( "GL_FRONT_FACE", GLenum, ["ctx->Polygon.FrontFace"], "", None ),
( "GL_GREEN_BIAS", GLfloat, ["ctx->Pixel.GreenBias"], "", None ),
- ( "GL_GREEN_BITS", GLint, ["ctx->Visual.greenBits"], "", None ),
+ ( "GL_GREEN_BITS", GLint, ["ctx->DrawBuffer->Visual.greenBits"],
+ "", None ),
( "GL_GREEN_SCALE", GLfloat, ["ctx->Pixel.GreenScale"], "", None ),
- ( "GL_INDEX_BITS", GLint, ["ctx->Visual.indexBits"], "", None ),
+ ( "GL_INDEX_BITS", GLint, ["ctx->DrawBuffer->Visual.indexBits"],
+ "", None ),
( "GL_INDEX_CLEAR_VALUE", GLint, ["ctx->Color.ClearIndex"], "", None ),
- ( "GL_INDEX_MODE", GLboolean, ["!ctx->Visual.rgbMode"], "", None ),
+ ( "GL_INDEX_MODE", GLboolean, ["!ctx->DrawBuffer->Visual.rgbMode"],
+ "", None ),
( "GL_INDEX_OFFSET", GLint, ["ctx->Pixel.IndexOffset"], "", None ),
( "GL_INDEX_SHIFT", GLint, ["ctx->Pixel.IndexShift"], "", None ),
( "GL_INDEX_WRITEMASK", GLint, ["ctx->Color.IndexMask"], "", None ),
@@ -368,12 +379,13 @@ StateVars = [
["ctx->ProjectionMatrixStack.Depth + 1"], "", None ),
( "GL_READ_BUFFER", GLenum, ["ctx->Pixel.ReadBuffer"], "", None ),
( "GL_RED_BIAS", GLfloat, ["ctx->Pixel.RedBias"], "", None ),
- ( "GL_RED_BITS", GLint, [" ctx->Visual.redBits "], "", None ),
+ ( "GL_RED_BITS", GLint, [" ctx->DrawBuffer->Visual.redBits "], "", None ),
( "GL_RED_SCALE", GLfloat, ["ctx->Pixel.RedScale"], "", None ),
( "GL_RENDER_MODE", GLenum, ["ctx->RenderMode"], "", None ),
( "GL_RESCALE_NORMAL", GLboolean,
["ctx->Transform.RescaleNormals"], "", None ),
- ( "GL_RGBA_MODE", GLboolean, ["ctx->Visual.rgbMode"], "", None ),
+ ( "GL_RGBA_MODE", GLboolean, ["ctx->DrawBuffer->Visual.rgbMode"],
+ "", None ),
( "GL_SCISSOR_BOX", GLint,
["ctx->Scissor.X",
"ctx->Scissor.Y",
@@ -384,7 +396,7 @@ StateVars = [
( "GL_SHADE_MODEL", GLenum, ["ctx->Light.ShadeModel"], "", None ),
( "GL_SHARED_TEXTURE_PALETTE_EXT", GLboolean,
["ctx->Texture.SharedPalette"], "", None ),
- ( "GL_STENCIL_BITS", GLint, ["ctx->Visual.stencilBits"], "", None ),
+ ( "GL_STENCIL_BITS", GLint, ["ctx->DrawBuffer->Visual.stencilBits"], "", None ),
( "GL_STENCIL_CLEAR_VALUE", GLint, ["ctx->Stencil.Clear"], "", None ),
( "GL_STENCIL_FAIL", GLenum,
["ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]"], "", None ),
@@ -401,7 +413,8 @@ StateVars = [
["ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]"], "", None ),
( "GL_STENCIL_WRITEMASK", GLint,
["ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]"], "", None ),
- ( "GL_STEREO", GLboolean, ["ctx->Visual.stereoMode"], "", None ),
+ ( "GL_STEREO", GLboolean, ["ctx->DrawBuffer->Visual.stereoMode"],
+ "", None ),
( "GL_SUBPIXEL_BITS", GLint, ["ctx->Const.SubPixelBits"], "", None ),
( "GL_TEXTURE_1D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_1D)"], "", None ),
( "GL_TEXTURE_2D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_2D)"], "", None ),
@@ -692,8 +705,10 @@ StateVars = [
["ctx->Multisample.SampleCoverageValue"], "", "ARB_multisample" ),
( "GL_SAMPLE_COVERAGE_INVERT_ARB", GLboolean,
["ctx->Multisample.SampleCoverageInvert"], "", "ARB_multisample" ),
- ( "GL_SAMPLE_BUFFERS_ARB", GLint, ["0"], "", "ARB_multisample" ),
- ( "GL_SAMPLES_ARB", GLint, ["0"], "", "ARB_multisample" ),
+ ( "GL_SAMPLE_BUFFERS_ARB", GLint,
+ ["ctx->DrawBuffer->Visual.sampleBuffers"], "", "ARB_multisample" ),
+ ( "GL_SAMPLES_ARB", GLint,
+ ["ctx->DrawBuffer->Visual.samples"], "", "ARB_multisample" ),
# GL_IBM_rasterpos_clip
( "GL_RASTER_POSITION_UNCLIPPED_IBM", GLboolean,
@@ -953,8 +968,7 @@ StateVars = [
( "GL_STENCIL_BACK_PASS_DEPTH_PASS", GLenum, ["ctx->Stencil.ZPassFunc[1]"], "", None ),
# GL_EXT_framebuffer_object
- ( "GL_FRAMEBUFFER_BINDING_EXT", GLint,
- ["ctx->CurrentFramebuffer ? ctx->CurrentFramebuffer->Name : 0"], "",
+ ( "GL_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->DrawBuffer->Name"], "",
"EXT_framebuffer_object" ),
( "GL_RENDERBUFFER_BINDING_EXT", GLint,
["ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0"], "",