summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h979
1 files changed, 485 insertions, 494 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2014745a7a..6ce9ae1d6a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 7.3
+ * Version: 7.5
*
- * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
- * Copyright (C) 1999-2008 VMware, Inc. All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -30,22 +30,17 @@
* Please try to mark derived values with a leading underscore ('_').
*/
-#ifndef TYPES_H
-#define TYPES_H
+#ifndef MTYPES_H
+#define MTYPES_H
-#include "glheader.h"
-#include <GL/internal/glcore.h> /* __GLcontextModes (GLvisual) */
-#include "config.h" /* Hardwired parameters */
+#include "main/glheader.h"
+#include "main/config.h"
+#include "main/compiler.h"
+#include "main/mfeatures.h"
#include "glapi/glapi.h"
#include "math/m_matrix.h" /* GLmatrix */
-#include "bitset.h"
-
-
-/**
- * Special, internal token
- */
-#define GL_SHADER_PROGRAM_MESA 0x9999
+#include "main/simple_list.h" /* struct simple_node */
/**
@@ -84,47 +79,18 @@
/**
- * Fixed point data type.
- */
-typedef int GLfixed;
-/*
- * Fixed point arithmetic macros
- */
-#ifndef FIXED_FRAC_BITS
-#define FIXED_FRAC_BITS 11
-#endif
-
-#define FIXED_SHIFT FIXED_FRAC_BITS
-#define FIXED_ONE (1 << FIXED_SHIFT)
-#define FIXED_HALF (1 << (FIXED_SHIFT-1))
-#define FIXED_FRAC_MASK (FIXED_ONE - 1)
-#define FIXED_INT_MASK (~FIXED_FRAC_MASK)
-#define FIXED_EPSILON 1
-#define FIXED_SCALE ((float) FIXED_ONE)
-#define FIXED_DBL_SCALE ((double) FIXED_ONE)
-#define FloatToFixed(X) (IROUND((X) * FIXED_SCALE))
-#define FixedToDouble(X) ((X) * (1.0 / FIXED_DBL_SCALE))
-#define IntToFixed(I) ((I) << FIXED_SHIFT)
-#define FixedToInt(X) ((X) >> FIXED_SHIFT)
-#define FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT)
-#define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)
-#define FixedFloor(X) ((X) & FIXED_INT_MASK)
-#define FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE))
-#define PosFloatToFixed(X) FloatToFixed(X)
-#define SignedFloatToFixed(X) FloatToFixed(X)
-
-
-
-/**
* \name Some forward type declarations
*/
/*@{*/
struct _mesa_HashTable;
+struct gl_attrib_node;
+struct gl_meta_state;
struct gl_pixelstore_attrib;
struct gl_program_cache;
struct gl_texture_format;
struct gl_texture_image;
struct gl_texture_object;
+struct st_context;
typedef struct __GLcontextRec GLcontext;
typedef struct __GLcontextModesRec GLvisual;
typedef struct gl_framebuffer GLframebuffer;
@@ -139,7 +105,7 @@ typedef struct gl_framebuffer GLframebuffer;
* In GL_ARB_vertex_shader / OpenGL 2.0 the aliasing is disallowed (the
* generic attributes are distinct/separate).
*/
-enum
+typedef enum
{
VERT_ATTRIB_POS = 0,
VERT_ATTRIB_WEIGHT = 1,
@@ -175,7 +141,7 @@ enum
VERT_ATTRIB_GENERIC14 = 30,
VERT_ATTRIB_GENERIC15 = 31,
VERT_ATTRIB_MAX = 32
-};
+} gl_vert_attrib;
/**
* Bitflags for vertex attributes.
@@ -223,32 +189,33 @@ enum
/**
* Indexes for vertex program result attributes
*/
-/*@{*/
-#define VERT_RESULT_HPOS 0
-#define VERT_RESULT_COL0 1
-#define VERT_RESULT_COL1 2
-#define VERT_RESULT_FOGC 3
-#define VERT_RESULT_TEX0 4
-#define VERT_RESULT_TEX1 5
-#define VERT_RESULT_TEX2 6
-#define VERT_RESULT_TEX3 7
-#define VERT_RESULT_TEX4 8
-#define VERT_RESULT_TEX5 9
-#define VERT_RESULT_TEX6 10
-#define VERT_RESULT_TEX7 11
-#define VERT_RESULT_PSIZ 12
-#define VERT_RESULT_BFC0 13
-#define VERT_RESULT_BFC1 14
-#define VERT_RESULT_EDGE 15
-#define VERT_RESULT_VAR0 16 /**< shader varying */
-#define VERT_RESULT_MAX (VERT_RESULT_VAR0 + MAX_VARYING)
-/*@}*/
+typedef enum
+{
+ VERT_RESULT_HPOS = 0,
+ VERT_RESULT_COL0 = 1,
+ VERT_RESULT_COL1 = 2,
+ VERT_RESULT_FOGC = 3,
+ VERT_RESULT_TEX0 = 4,
+ VERT_RESULT_TEX1 = 5,
+ VERT_RESULT_TEX2 = 6,
+ VERT_RESULT_TEX3 = 7,
+ VERT_RESULT_TEX4 = 8,
+ VERT_RESULT_TEX5 = 9,
+ VERT_RESULT_TEX6 = 10,
+ VERT_RESULT_TEX7 = 11,
+ VERT_RESULT_PSIZ = 12,
+ VERT_RESULT_BFC0 = 13,
+ VERT_RESULT_BFC1 = 14,
+ VERT_RESULT_EDGE = 15,
+ VERT_RESULT_VAR0 = 16 /**< shader varying */,
+ VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING)
+} gl_vert_result;
/**
* Indexes for fragment program input attributes.
*/
-enum
+typedef enum
{
FRAG_ATTRIB_WPOS = 0,
FRAG_ATTRIB_COL0 = 1,
@@ -262,9 +229,11 @@ enum
FRAG_ATTRIB_TEX5 = 9,
FRAG_ATTRIB_TEX6 = 10,
FRAG_ATTRIB_TEX7 = 11,
- FRAG_ATTRIB_VAR0 = 12, /**< shader varying */
+ FRAG_ATTRIB_FACE = 12, /**< front/back face */
+ FRAG_ATTRIB_PNTC = 13, /**< sprite/point coord */
+ FRAG_ATTRIB_VAR0 = 14, /**< shader varying */
FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
-};
+} gl_frag_attrib;
/**
* Bitflags for fragment program input attributes.
@@ -274,6 +243,8 @@ enum
#define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0)
#define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1)
#define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC)
+#define FRAG_BIT_FACE (1 << FRAG_ATTRIB_FACE)
+#define FRAG_BIT_PNTC (1 << FRAG_ATTRIB_PNTC)
#define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0)
#define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1)
#define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2)
@@ -301,41 +272,41 @@ enum
/**
* Fragment program results
*/
-enum
+typedef enum
{
- FRAG_RESULT_COLR = 0,
- FRAG_RESULT_COLH = 1,
- FRAG_RESULT_DEPR = 2,
- FRAG_RESULT_DATA0 = 3,
+ FRAG_RESULT_DEPTH = 0,
+ FRAG_RESULT_COLOR = 1,
+ FRAG_RESULT_DATA0 = 2,
FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS)
-};
+} gl_frag_result;
/**
* Indexes for all renderbuffers
*/
-enum {
- BUFFER_FRONT_LEFT = 0, /* the four standard color buffers */
- BUFFER_BACK_LEFT = 1,
- BUFFER_FRONT_RIGHT = 2,
- BUFFER_BACK_RIGHT = 3,
- BUFFER_AUX0 = 4, /* optional aux buffer */
- BUFFER_AUX1 = 5,
- BUFFER_AUX2 = 6,
- BUFFER_AUX3 = 7,
- BUFFER_DEPTH = 8,
- BUFFER_STENCIL = 9,
- BUFFER_ACCUM = 10,
- BUFFER_COLOR0 = 11, /* generic renderbuffers */
- BUFFER_COLOR1 = 12,
- BUFFER_COLOR2 = 13,
- BUFFER_COLOR3 = 14,
- BUFFER_COLOR4 = 15,
- BUFFER_COLOR5 = 16,
- BUFFER_COLOR6 = 17,
- BUFFER_COLOR7 = 18,
- BUFFER_COUNT = 19
-};
+typedef enum
+{
+ /* the four standard color buffers */
+ BUFFER_FRONT_LEFT,
+ BUFFER_BACK_LEFT,
+ BUFFER_FRONT_RIGHT,
+ BUFFER_BACK_RIGHT,
+ BUFFER_DEPTH,
+ BUFFER_STENCIL,
+ BUFFER_ACCUM,
+ /* optional aux buffer */
+ BUFFER_AUX0,
+ /* generic renderbuffers */
+ BUFFER_COLOR0,
+ BUFFER_COLOR1,
+ BUFFER_COLOR2,
+ BUFFER_COLOR3,
+ BUFFER_COLOR4,
+ BUFFER_COLOR5,
+ BUFFER_COLOR6,
+ BUFFER_COLOR7,
+ BUFFER_COUNT
+} gl_buffer_index;
/**
* Bit flags for all renderbuffers
@@ -368,9 +339,6 @@ enum {
BUFFER_BIT_FRONT_RIGHT | \
BUFFER_BIT_BACK_RIGHT | \
BUFFER_BIT_AUX0 | \
- BUFFER_BIT_AUX1 | \
- BUFFER_BIT_AUX2 | \
- BUFFER_BIT_AUX3 | \
BUFFER_BIT_COLOR0 | \
BUFFER_BIT_COLOR1 | \
BUFFER_BIT_COLOR2 | \
@@ -382,12 +350,13 @@ enum {
/** The pixel transfer path has three color tables: */
-/*@{*/
-#define COLORTABLE_PRECONVOLUTION 0
-#define COLORTABLE_POSTCONVOLUTION 1
-#define COLORTABLE_POSTCOLORMATRIX 2
-#define COLORTABLE_MAX 3
-/*@}*/
+typedef enum
+{
+ COLORTABLE_PRECONVOLUTION,
+ COLORTABLE_POSTCONVOLUTION,
+ COLORTABLE_POSTCOLORMATRIX,
+ COLORTABLE_MAX
+} gl_colortable_index;
/**
@@ -497,7 +466,7 @@ struct gl_light
GLfloat Diffuse[4]; /**< diffuse color */
GLfloat Specular[4]; /**< specular color */
GLfloat EyePosition[4]; /**< position in eye coordinates */
- GLfloat EyeDirection[4]; /**< spotlight dir in eye coordinates */
+ GLfloat SpotDirection[4]; /**< spotlight direction in eye coordinates */
GLfloat SpotExponent;
GLfloat SpotCutoff; /**< in degrees */
GLfloat _CosCutoffNeg; /**< = cos(SpotCutoff) */
@@ -516,7 +485,7 @@ struct gl_light
GLfloat _Position[4]; /**< position in eye/obj coordinates */
GLfloat _VP_inf_norm[3]; /**< Norm direction to infinite light */
GLfloat _h_inf_norm[3]; /**< Norm( _VP_inf_norm + <0,0,1> ) */
- GLfloat _NormDirection[4]; /**< normalized spotlight direction */
+ GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */
GLfloat _VP_inf_spot_attenuation;
GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /**< to replace a pow() call */
@@ -624,9 +593,7 @@ struct gl_current_attrib
* \note Index and Edgeflag current values are stored as floats in the
* SIX and SEVEN attribute slots.
*/
- /*@{*/
GLfloat Attrib[VERT_ATTRIB_MAX][4]; /**< Position, color, texcoords, etc */
- /*@}*/
/**
* \name Current raster position attributes (always valid).
@@ -659,84 +626,6 @@ struct gl_depthbuffer_attrib
/**
- * glEnable()/glDisable() attribute group (GL_ENABLE_BIT).
- */
-struct gl_enable_attrib
-{
- GLboolean AlphaTest;
- GLboolean AutoNormal;
- GLboolean Blend;
- GLbitfield ClipPlanes;
- GLboolean ColorMaterial;
- GLboolean ColorTable[COLORTABLE_MAX];
- GLboolean Convolution1D;
- GLboolean Convolution2D;
- GLboolean Separable2D;
- GLboolean CullFace;
- GLboolean DepthTest;
- GLboolean Dither;
- GLboolean Fog;
- GLboolean Histogram;
- GLboolean Light[MAX_LIGHTS];
- GLboolean Lighting;
- GLboolean LineSmooth;
- GLboolean LineStipple;
- GLboolean IndexLogicOp;
- GLboolean ColorLogicOp;
- GLboolean Map1Color4;
- GLboolean Map1Index;
- GLboolean Map1Normal;
- GLboolean Map1TextureCoord1;
- GLboolean Map1TextureCoord2;
- GLboolean Map1TextureCoord3;
- GLboolean Map1TextureCoord4;
- GLboolean Map1Vertex3;
- GLboolean Map1Vertex4;
- GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */
- GLboolean Map2Color4;
- GLboolean Map2Index;
- GLboolean Map2Normal;
- GLboolean Map2TextureCoord1;
- GLboolean Map2TextureCoord2;
- GLboolean Map2TextureCoord3;
- GLboolean Map2TextureCoord4;
- GLboolean Map2Vertex3;
- GLboolean Map2Vertex4;
- GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */
- GLboolean MinMax;
- GLboolean Normalize;
- GLboolean PixelTexture;
- GLboolean PointSmooth;
- GLboolean PolygonOffsetPoint;
- GLboolean PolygonOffsetLine;
- GLboolean PolygonOffsetFill;
- GLboolean PolygonSmooth;
- GLboolean PolygonStipple;
- GLboolean RescaleNormals;
- GLboolean Scissor;
- GLboolean Stencil;
- GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */
- GLboolean MultisampleEnabled; /* GL_ARB_multisample */
- GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */
- GLboolean SampleAlphaToOne; /* GL_ARB_multisample */
- GLboolean SampleCoverage; /* GL_ARB_multisample */
- GLboolean SampleCoverageInvert; /* GL_ARB_multisample */
- GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */
- GLuint Texture[MAX_TEXTURE_UNITS];
- GLuint TexGen[MAX_TEXTURE_UNITS];
- /* SGI_texture_color_table */
- GLboolean TextureColorTable[MAX_TEXTURE_UNITS];
- /* GL_ARB_vertex_program / GL_NV_vertex_program */
- GLboolean VertexProgram;
- GLboolean VertexProgramPointSize;
- GLboolean VertexProgramTwoSide;
- /* GL_ARB_point_sprite / GL_NV_point_sprite */
- GLboolean PointSprite;
- GLboolean FragmentShaderATI;
-};
-
-
-/**
* Evaluator attribute group (GL_EVAL_BIT).
*/
struct gl_eval_attrib
@@ -823,11 +712,11 @@ struct gl_hint_attrib
*/
struct gl_histogram_attrib
{
- GLuint Width; /**< number of table entries */
- GLint Format; /**< GL_ALPHA, GL_RGB, etc */
- GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /**< the histogram */
- GLboolean Sink; /**< terminate image transfer? */
- GLubyte RedSize; /**< Bits per counter */
+ GLuint Width; /**< number of table entries */
+ GLint Format; /**< GL_ALPHA, GL_RGB, etc */
+ GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /**< the histogram */
+ GLboolean Sink; /**< terminate image transfer? */
+ GLubyte RedSize; /**< Bits per counter */
GLubyte GreenSize;
GLubyte BlueSize;
GLubyte AlphaSize;
@@ -887,6 +776,7 @@ struct gl_light_attrib
GLboolean Enabled; /**< Lighting enabled flag */
GLenum ShadeModel; /**< GL_FLAT or GL_SMOOTH */
+ GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */
GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */
GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */
GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */
@@ -901,7 +791,7 @@ struct gl_light_attrib
/*@{*/
GLboolean _NeedEyeCoords;
GLboolean _NeedVertices; /**< Use fast shader? */
- GLbitfield _Flags; /**< LIGHT_* flags, see above */
+ GLbitfield _Flags; /**< LIGHT_* flags, see above */
GLfloat _BaseColor[2][3];
/*@}*/
};
@@ -1006,13 +896,15 @@ struct gl_pixel_attrib
/*--- Begin Pixel Transfer State ---*/
/* Fields are in the order in which they're applied... */
- /* Scale & Bias (index shift, offset) */
+ /** Scale & Bias (index shift, offset) */
+ /*@{*/
GLfloat RedBias, RedScale;
GLfloat GreenBias, GreenScale;
GLfloat BlueBias, BlueScale;
GLfloat AlphaBias, AlphaScale;
GLfloat DepthBias, DepthScale;
GLint IndexShift, IndexOffset;
+ /*@}*/
/* Pixel Maps */
/* Note: actual pixel maps are not part of this attrib group */
@@ -1028,7 +920,7 @@ struct gl_pixel_attrib
GLboolean Convolution1DEnabled;
GLboolean Convolution2DEnabled;
GLboolean Separable2DEnabled;
- GLfloat ConvolutionBorderColor[3][4];
+ GLfloat ConvolutionBorderColor[3][4]; /**< RGBA */
GLenum ConvolutionBorderMode[3];
GLfloat ConvolutionFilterScale[3][4]; /**< RGBA */
GLfloat ConvolutionFilterBias[3][4]; /**< RGBA */
@@ -1047,12 +939,12 @@ struct gl_pixel_attrib
/*--- End Pixel Transfer State ---*/
- /* Pixel Zoom */
+ /** glPixelZoom */
GLfloat ZoomX, ZoomY;
/** GL_SGI_texture_color_table */
- GLfloat TextureColorTableScale[4];
- GLfloat TextureColorTableBias[4];
+ GLfloat TextureColorTableScale[4]; /**< RGBA */
+ GLfloat TextureColorTableBias[4]; /**< RGBA */
};
@@ -1108,51 +1000,69 @@ struct gl_scissor_attrib
/**
* Stencil attribute group (GL_STENCIL_BUFFER_BIT).
+ *
+ * Three sets of stencil data are tracked so that OpenGL 2.0,
+ * GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported
+ * simultaneously. In each of the stencil state arrays, element 0 corresponds
+ * to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 /
+ * GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the
+ * GL_EXT_stencil_two_side GL_BACK state.
+ *
+ * The derived value \c _BackFace is either 1 or 2 depending on whether or
+ * not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled.
+ *
+ * The derived value \c _TestTwoSide is set when the front-face and back-face
+ * stencil state are different.
*/
struct gl_stencil_attrib
{
GLboolean Enabled; /**< Enabled flag */
GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */
- GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 1) */
+ GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */
+ GLboolean _Enabled; /**< Enabled and stencil buffer present */
GLboolean _TestTwoSide;
- GLenum Function[2]; /**< Stencil function */
- GLenum FailFunc[2]; /**< Fail function */
- GLenum ZPassFunc[2]; /**< Depth buffer pass function */
- GLenum ZFailFunc[2]; /**< Depth buffer fail function */
- GLint Ref[2]; /**< Reference value */
- GLuint ValueMask[2]; /**< Value mask */
- GLuint WriteMask[2]; /**< Write mask */
+ GLubyte _BackFace; /**< Current back stencil state (1 or 2) */
+ GLenum Function[3]; /**< Stencil function */
+ GLenum FailFunc[3]; /**< Fail function */
+ GLenum ZPassFunc[3]; /**< Depth buffer pass function */
+ GLenum ZFailFunc[3]; /**< Depth buffer fail function */
+ GLint Ref[3]; /**< Reference value */
+ GLuint ValueMask[3]; /**< Value mask */
+ GLuint WriteMask[3]; /**< Write mask */
GLuint Clear; /**< Clear value */
};
-#define NUM_TEXTURE_TARGETS 7 /* 1D, 2D, 3D, CUBE, RECT, 1D_STACK, and 2D_STACK */
-
/**
- * An index for each type of texture object
+ * An index for each type of texture object. These correspond to the GL
+ * texture target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc.
+ * Note: the order is from highest priority to lowest priority.
*/
-/*@{*/
-#define TEXTURE_1D_INDEX 0
-#define TEXTURE_2D_INDEX 1
-#define TEXTURE_3D_INDEX 2
-#define TEXTURE_CUBE_INDEX 3
-#define TEXTURE_RECT_INDEX 4
-#define TEXTURE_1D_ARRAY_INDEX 5
-#define TEXTURE_2D_ARRAY_INDEX 6
-/*@}*/
+typedef enum
+{
+ TEXTURE_2D_ARRAY_INDEX,
+ TEXTURE_1D_ARRAY_INDEX,
+ TEXTURE_CUBE_INDEX,
+ TEXTURE_3D_INDEX,
+ TEXTURE_RECT_INDEX,
+ TEXTURE_2D_INDEX,
+ TEXTURE_1D_INDEX,
+ NUM_TEXTURE_TARGETS
+} gl_texture_index;
+
/**
* Bit flags for each type of texture object
* Used for Texture.Unit[]._ReallyEnabled flags.
*/
/*@{*/
-#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX)
-#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX)
-#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX)
+#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX)
+#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX)
#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX)
+#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX)
#define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX)
-#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX)
-#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX)
+#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX)
+#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX)
/*@}*/
@@ -1187,27 +1097,12 @@ struct gl_stencil_attrib
/*@}*/
-/* A selection of state flags to make driver and module's lives easier. */
-#define ENABLE_TEXGEN0 0x1
-#define ENABLE_TEXGEN1 0x2
-#define ENABLE_TEXGEN2 0x4
-#define ENABLE_TEXGEN3 0x8
-#define ENABLE_TEXGEN4 0x10
-#define ENABLE_TEXGEN5 0x20
-#define ENABLE_TEXGEN6 0x40
-#define ENABLE_TEXGEN7 0x80
-#define ENABLE_TEXMAT0 0x1 /* Ie. not the identity matrix */
-#define ENABLE_TEXMAT1 0x2
-#define ENABLE_TEXMAT2 0x4
-#define ENABLE_TEXMAT3 0x8
-#define ENABLE_TEXMAT4 0x10
-#define ENABLE_TEXMAT5 0x20
-#define ENABLE_TEXMAT6 0x40
-#define ENABLE_TEXMAT7 0x80
+/** Tex-gen enabled for texture unit? */
+#define ENABLE_TEXGEN(unit) (1 << (unit))
-#define ENABLE_TEXGEN(i) (ENABLE_TEXGEN0 << (i))
-#define ENABLE_TEXMAT(i) (ENABLE_TEXMAT0 << (i))
+/** Non-identity texture matrix for texture unit? */
+#define ENABLE_TEXMAT(unit) (1 << (unit))
/**
@@ -1383,15 +1278,16 @@ struct gl_texture_image
/**
* Indexes for cube map faces.
*/
-/*@{*/
-#define FACE_POS_X 0
-#define FACE_NEG_X 1
-#define FACE_POS_Y 2
-#define FACE_NEG_Y 3
-#define FACE_POS_Z 4
-#define FACE_NEG_Z 5
-#define MAX_FACES 6
-/*@}*/
+typedef enum
+{
+ FACE_POS_X = 0,
+ FACE_NEG_X = 1,
+ FACE_POS_Y = 2,
+ FACE_NEG_Y = 3,
+ FACE_POS_Z = 4,
+ FACE_NEG_Z = 5,
+ MAX_FACES = 6
+} gl_face_index;
/**
@@ -1407,7 +1303,6 @@ struct gl_texture_object
GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
GLfloat Priority; /**< in [0,1] */
GLfloat BorderColor[4]; /**< unclamped */
- GLchan _BorderChan[4]; /**< clamped, as GLchan */
GLenum WrapS; /**< S-axis texture image wrap mode */
GLenum WrapT; /**< T-axis texture image wrap mode */
GLenum WrapR; /**< R-axis texture image wrap mode */
@@ -1419,21 +1314,18 @@ struct gl_texture_object
GLint BaseLevel; /**< min mipmap level, OpenGL 1.2 */
GLint MaxLevel; /**< max mipmap level, OpenGL 1.2 */
GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
- GLboolean CompareFlag; /**< GL_SGIX_shadow */
- GLenum CompareOperator; /**< GL_SGIX_shadow */
- GLfloat ShadowAmbient; /**< GL_ARB_shadow_ambient */
GLenum CompareMode; /**< GL_ARB_shadow */
GLenum CompareFunc; /**< GL_ARB_shadow */
- GLenum _Function; /**< Comparison function derived from
- * \c CompareOperator, \c CompareMode, and
- * \c CompareFunc.
- */
+ GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */
GLenum DepthMode; /**< GL_ARB_depth_texture */
GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */
GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */
GLint CropRect[4]; /**< GL_OES_draw_texture */
+ GLenum Swizzle[4]; /**< GL_EXT_texture_swizzle */
+ GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */
GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */
GLboolean _Complete; /**< Is texture object complete? */
+ GLboolean _RenderToTexture; /**< Any rendering to this texture? */
/** Actual texture images, indexed by [cube face] and [mipmap level] */
struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
@@ -1452,25 +1344,39 @@ struct gl_texture_object
};
+/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */
+#define MAX_COMBINER_TERMS 4
+
+
/**
* Texture combine environment state.
- *
- * \todo
- * If GL_NV_texture_env_combine4 is ever supported, the arrays in this
- * structure will need to be expanded for 4 elements.
*/
struct gl_tex_env_combine_state
{
GLenum ModeRGB; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
GLenum ModeA; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
- GLenum SourceRGB[3]; /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
- GLenum SourceA[3]; /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
- GLenum OperandRGB[3]; /**< SRC_COLOR, ONE_MINUS_SRC_COLOR, etc */
- GLenum OperandA[3]; /**< SRC_ALPHA, ONE_MINUS_SRC_ALPHA, etc */
+ /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */
+ GLenum SourceRGB[MAX_COMBINER_TERMS];
+ GLenum SourceA[MAX_COMBINER_TERMS];
+ /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */
+ GLenum OperandRGB[MAX_COMBINER_TERMS];
+ GLenum OperandA[MAX_COMBINER_TERMS];
GLuint ScaleShiftRGB; /**< 0, 1 or 2 */
GLuint ScaleShiftA; /**< 0, 1 or 2 */
- GLuint _NumArgsRGB; /**< Number of inputs used for the combine mode. */
- GLuint _NumArgsA; /**< Number of inputs used for the combine mode. */
+ GLuint _NumArgsRGB; /**< Number of inputs used for the RGB combiner */
+ GLuint _NumArgsA; /**< Number of inputs used for the A combiner */
+};
+
+
+/**
+ * Texture coord generation state.
+ */
+struct gl_texgen
+{
+ GLenum Mode; /**< GL_EYE_LINEAR, GL_SPHERE_MAP, etc */
+ GLbitfield _ModeBit; /**< TEXGEN_x bit corresponding to Mode */
+ GLfloat ObjectPlane[4];
+ GLfloat EyePlane[4];
};
@@ -1486,29 +1392,17 @@ struct gl_texture_unit
GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */
GLfloat EnvColor[4];
+
+ struct gl_texgen GenS;
+ struct gl_texgen GenT;
+ struct gl_texgen GenR;
+ struct gl_texgen GenQ;
GLbitfield TexGenEnabled; /**< Bitwise-OR of [STRQ]_BIT values */
- /** \name Tex coord generation mode
- * Either GL_OBJECT_LINEAR, GL_EYE_LINEAR or GL_SPHERE_MAP. */
- /*@{*/
- GLenum GenModeS;
- GLenum GenModeT;
- GLenum GenModeR;
- GLenum GenModeQ;
- /*@}*/
- GLbitfield _GenBitS;
- GLbitfield _GenBitT;
- GLbitfield _GenBitR;
- GLbitfield _GenBitQ;
- GLbitfield _GenFlags; /**< bitwise or of _GenBit[STRQ] */
- GLfloat ObjectPlaneS[4];
- GLfloat ObjectPlaneT[4];
- GLfloat ObjectPlaneR[4];
- GLfloat ObjectPlaneQ[4];
- GLfloat EyePlaneS[4];
- GLfloat EyePlaneT[4];
- GLfloat EyePlaneR[4];
- GLfloat EyePlaneQ[4];
+ GLbitfield _GenFlags; /**< Bitwise-OR of Gen[STRQ]._ModeBit */
+
GLfloat LodBias; /**< for biasing mipmap levels */
+ GLenum BumpTarget;
+ GLfloat RotMatrix[4]; /* 2x2 matrix */
/**
* \name GL_EXT_texture_env_combine
@@ -1527,15 +1421,11 @@ struct gl_texture_unit
*/
struct gl_tex_env_combine_state *_CurrentCombine;
- struct gl_texture_object *Current1D;
- struct gl_texture_object *Current2D;
- struct gl_texture_object *Current3D;
- struct gl_texture_object *CurrentCubeMap; /**< GL_ARB_texture_cube_map */
- struct gl_texture_object *CurrentRect; /**< GL_NV_texture_rectangle */
- struct gl_texture_object *Current1DArray; /**< GL_MESA_texture_array */
- struct gl_texture_object *Current2DArray; /**< GL_MESA_texture_array */
+ /** Current texture object pointers */
+ struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS];
- struct gl_texture_object *_Current; /**< Points to really enabled tex obj */
+ /** Points to highest priority, complete and enabled texture object */
+ struct gl_texture_object *_Current;
/** GL_SGI_texture_color_table */
/*@{*/
@@ -1546,32 +1436,37 @@ struct gl_texture_unit
};
-
/**
* Texture attribute group (GL_TEXTURE_BIT).
*/
struct gl_texture_attrib
{
- /**
- * name multitexture
- */
- /**@{*/
- GLuint CurrentUnit; /**< Active texture unit [0, MaxTextureImageUnits-1] */
- GLbitfield _EnabledUnits; /**< one bit set for each really-enabled unit */
- GLbitfield _EnabledCoordUnits; /**< one bit per enabled coordinate unit */
- GLbitfield _GenFlags; /**< for texgen */
- GLbitfield _TexGenEnabled;
- GLbitfield _TexMatEnabled;
- /**@}*/
-
+ GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */
struct gl_texture_unit Unit[MAX_TEXTURE_UNITS];
- /** Proxy texture objects */
struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS];
+ /** GL_ARB_seamless_cubemap */
+ GLboolean CubeMapSeamless;
+
/** GL_EXT_shared_texture_palette */
GLboolean SharedPalette;
struct gl_color_table Palette;
+
+ /** Texture units/samplers used by vertex or fragment texturing */
+ GLbitfield _EnabledUnits;
+
+ /** Texture coord units/sets used for fragment texturing */
+ GLbitfield _EnabledCoordUnits;
+
+ /** Texture coord units that have texgen enabled */
+ GLbitfield _TexGenEnabled;
+
+ /** Texture coord units that have non-identity matrices */
+ GLbitfield _TexMatEnabled;
+
+ /** Bitwise-OR of all Texture.Unit[i]._GenFlags */
+ GLbitfield _GenFlags;
};
@@ -1587,6 +1482,7 @@ struct gl_transform_attrib
GLboolean Normalize; /**< Normalize all normals? */
GLboolean RescaleNormals; /**< GL_EXT_rescale_normal */
GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */
+ GLboolean DepthClamp; /**< GL_ARB_depth_clamp */
GLboolean CullVertexFlag; /**< True if GL_CULL_VERTEX_EXT is enabled */
GLfloat CullEyePos[4];
@@ -1607,33 +1503,26 @@ struct gl_viewport_attrib
/**
- * Node for the attribute stack.
- */
-struct gl_attrib_node
-{
- GLbitfield kind;
- void *data;
- struct gl_attrib_node *next;
-};
-
-
-/**
* GL_ARB_vertex/pixel_buffer_object buffer object
*/
struct gl_buffer_object
{
GLint RefCount;
GLuint Name;
- GLenum Usage;
- GLenum Access;
- GLvoid *Pointer; /**< Only valid while buffer is mapped */
- GLsizeiptrARB Size; /**< Size of storage in bytes */
- GLubyte *Data; /**< Location of storage either in RAM or VRAM. */
- GLboolean OnCard; /**< Is buffer in VRAM? (hardware drivers) */
+ GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */
+ GLsizeiptrARB Size; /**< Size of buffer storage in bytes */
+ GLubyte *Data; /**< Location of storage either in RAM or VRAM. */
+ /** Fields describing a mapped buffer */
+ /*@{*/
+ GLbitfield AccessFlags; /**< Mask of GL_MAP_x_BIT flags */
+ GLvoid *Pointer; /**< User-space address of mapping */
+ GLintptr Offset; /**< Mapped offset */
+ GLsizeiptr Length; /**< Mapped length */
+ /*@}*/
+ GLboolean Written; /**< Ever written to? (for debugging) */
};
-
/**
* Client pixel packing/unpacking attributes
*/
@@ -1643,8 +1532,8 @@ struct gl_pixelstore_attrib
GLint RowLength;
GLint SkipPixels;
GLint SkipRows;
- GLint ImageHeight; /**< for GL_EXT_texture3D */
- GLint SkipImages; /**< for GL_EXT_texture3D */
+ GLint ImageHeight;
+ GLint SkipImages;
GLboolean SwapBytes;
GLboolean LsbFirst;
GLboolean ClientStorage; /**< GL_APPLE_client_storage */
@@ -1653,7 +1542,6 @@ struct gl_pixelstore_attrib
};
-
/**
* Client vertex array attributes
*/
@@ -1661,15 +1549,16 @@ struct gl_client_array
{
GLint Size; /**< components per element (1,2,3,4) */
GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */
+ GLenum Format; /**< default: GL_RGBA, but may be GL_BGRA */
GLsizei Stride; /**< user-specified stride */
GLsizei StrideB; /**< actual stride in bytes */
const GLubyte *Ptr; /**< Points to array data */
GLboolean Enabled; /**< Enabled flag is a boolean */
GLboolean Normalized; /**< GL_ARB_vertex_program */
+ GLuint _ElementSize; /**< size of each element in bytes */
- /**< GL_ARB_vertex_buffer_object */
- struct gl_buffer_object *BufferObj;
- GLuint _MaxElement;
+ struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
+ GLuint _MaxElement; /**< max element index into array buffer + 1 */
};
@@ -1682,9 +1571,14 @@ struct gl_array_object
/** Name of the array object as received from glGenVertexArrayAPPLE. */
GLuint Name;
+ GLint RefCount;
+ _glthread_Mutex Mutex;
+ GLboolean VBOonly; /**< require all arrays to live in VBOs? */
+
/** Conventional vertex arrays */
/*@{*/
struct gl_client_array Vertex;
+ struct gl_client_array Weight;
struct gl_client_array Normal;
struct gl_client_array Color;
struct gl_client_array SecondaryColor;
@@ -1695,11 +1589,22 @@ struct gl_array_object
struct gl_client_array PointSize;
/*@}*/
- /** Generic arrays for vertex programs/shaders */
- struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
+ /**
+ * Generic arrays for vertex programs/shaders.
+ * For NV vertex programs, these attributes alias and take priority
+ * over the conventional attribs above. For ARB vertex programs and
+ * GLSL vertex shaders, these attributes are separate.
+ */
+ struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
/** Mask of _NEW_ARRAY_* values indicating which arrays are enabled */
GLbitfield _Enabled;
+
+ /**
+ * Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
+ * we can determine the max legal (in bounds) glDrawElements array index.
+ */
+ GLuint _MaxElement;
};
@@ -1708,9 +1613,15 @@ struct gl_array_object
*/
struct gl_array_attrib
{
+ /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
struct gl_array_object *ArrayObj;
+
+ /** The default vertex array object */
struct gl_array_object *DefaultArrayObj;
+ /** Array objects (GL_ARB/APPLE_vertex_array_object) */
+ struct _mesa_HashTable *Objects;
+
GLint ActiveTexture; /**< Client Active Texture */
GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
@@ -1718,11 +1629,9 @@ struct gl_array_attrib
GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
#if FEATURE_ARB_vertex_buffer_object
- struct gl_buffer_object *NullBufferObj;
struct gl_buffer_object *ArrayBufferObj;
struct gl_buffer_object *ElementArrayBufferObj;
#endif
- GLuint _MaxElement; /* Min of all enabled array's maxes */
};
@@ -1732,7 +1641,7 @@ struct gl_array_attrib
struct gl_feedback
{
GLenum Type;
- GLbitfield _Mask; /* FB_* bits */
+ GLbitfield _Mask; /**< FB_* bits */
GLfloat *Buffer;
GLuint BufferSize;
GLuint Count;
@@ -1830,24 +1739,24 @@ struct gl_evaluators
* be "uniform" variables since they can only be set outside glBegin/End.
* They're also all stored in the same Parameters array.
*/
-enum register_file
-{
- PROGRAM_TEMPORARY = 0, /**< machine->Temporary[] */
- PROGRAM_LOCAL_PARAM = 1, /**< gl_program->LocalParams[] */
- PROGRAM_ENV_PARAM = 2, /**< gl_program->Parameters[] */
- PROGRAM_STATE_VAR = 3, /**< gl_program->Parameters[] */
- PROGRAM_INPUT = 4, /**< machine->Inputs[] */
- PROGRAM_OUTPUT = 5, /**< machine->Outputs[] */
- PROGRAM_NAMED_PARAM = 6, /**< gl_program->Parameters[] */
- PROGRAM_CONSTANT = 7, /**< gl_program->Parameters[] */
- PROGRAM_UNIFORM = 8, /**< gl_program->Parameters[] */
- PROGRAM_VARYING = 9, /**< machine->Inputs[]/Outputs[] */
- PROGRAM_WRITE_ONLY = 10, /**< A dummy, write-only register */
- PROGRAM_ADDRESS = 11, /**< machine->AddressReg */
- PROGRAM_SAMPLER = 12, /**< for shader samplers, compile-time only */
- PROGRAM_UNDEFINED = 13, /**< Invalid value */
+typedef enum
+{
+ PROGRAM_TEMPORARY, /**< machine->Temporary[] */
+ PROGRAM_INPUT, /**< machine->Inputs[] */
+ PROGRAM_OUTPUT, /**< machine->Outputs[] */
+ PROGRAM_VARYING, /**< machine->Inputs[]/Outputs[] */
+ PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
+ PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */
+ PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */
+ PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */
+ PROGRAM_CONSTANT, /**< gl_program->Parameters[] */
+ PROGRAM_UNIFORM, /**< gl_program->Parameters[] */
+ PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */
+ PROGRAM_ADDRESS, /**< machine->AddressReg */
+ PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */
+ PROGRAM_UNDEFINED, /**< Invalid/TBD value */
PROGRAM_FILE_MAX
-};
+} gl_register_file;
/** Vertex and fragment instructions */
@@ -1892,7 +1801,7 @@ struct gl_program
/** Map from sampler unit to texture unit (set by glUniform1i()) */
GLubyte SamplerUnits[MAX_SAMPLERS];
/** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
- GLubyte SamplerTargets[MAX_SAMPLERS];
+ gl_texture_index SamplerTargets[MAX_SAMPLERS];
/** Logical counts */
/*@{*/
@@ -1935,9 +1844,6 @@ struct gl_fragment_program
struct gl_program Base; /**< base class */
GLenum FogOption;
GLboolean UsesKill; /**< shader uses KIL instruction */
- GLboolean UsesPointCoord; /**< shader uses gl_PointCoord */
- GLboolean UsesFrontFacing; /**< shader used gl_FrontFacing */
- GLboolean UsesFogFragCoord; /**< shader used gl_FogFragCoord */
};
@@ -1956,14 +1862,14 @@ struct gl_program_state
*/
struct gl_vertex_program_state
{
- GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */
- GLboolean _Enabled; /**< Enabled and _valid_ user program? */
- GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
- GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
+ GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */
+ GLboolean _Enabled; /**< Enabled and _valid_ user program? */
+ GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
+ GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
struct gl_vertex_program *Current; /**< User-bound vertex program */
- /** Currently enabled and valid vertex program (including internal programs,
- * user-defined vertex programs and GLSL vertex shaders).
+ /** Currently enabled and valid vertex program (including internal
+ * programs, user-defined vertex programs and GLSL vertex shaders).
* This is the program we must use when rendering.
*/
struct gl_vertex_program *_Current;
@@ -1983,12 +1889,7 @@ struct gl_vertex_program_state
/** Cache of fixed-function programs */
struct gl_program_cache *Cache;
-#if FEATURE_MESA_program_debug
- GLprogramcallbackMESA Callback;
- GLvoid *CallbackData;
- GLboolean CallbackEnabled;
- GLuint CurrentPosition;
-#endif
+ GLboolean _Overriden;
};
@@ -2001,8 +1902,8 @@ struct gl_fragment_program_state
GLboolean _Enabled; /**< Enabled and _valid_ user program? */
struct gl_fragment_program *Current; /**< User-bound fragment program */
- /** Currently enabled and valid fragment program (including internal programs,
- * user-defined fragment programs and GLSL fragment shaders).
+ /** Currently enabled and valid fragment program (including internal
+ * programs, user-defined fragment programs and GLSL fragment shaders).
* This is the program we must use when rendering.
*/
struct gl_fragment_program *_Current;
@@ -2017,13 +1918,6 @@ struct gl_fragment_program_state
/** Cache of fixed-function programs */
struct gl_program_cache *Cache;
-
-#if FEATURE_MESA_program_debug
- GLprogramcallbackMESA Callback;
- GLvoid *CallbackData;
- GLboolean CallbackEnabled;
- GLuint CurrentPosition;
-#endif
};
@@ -2094,9 +1988,26 @@ struct gl_query_state
};
+/** Sync object state */
+struct gl_sync_object {
+ struct simple_node link;
+ GLenum Type; /**< GL_SYNC_FENCE */
+ GLuint Name; /**< Fence name */
+ GLint RefCount; /**< Reference count */
+ GLboolean DeletePending; /**< Object was deleted while there were still
+ * live references (e.g., sync not yet finished)
+ */
+ GLenum SyncCondition;
+ GLbitfield Flags; /**< Flags passed to glFenceSync */
+ GLuint StatusFlag:1; /**< Has the sync object been signaled? */
+};
+
+
/** Set by #pragma directives */
struct gl_sl_pragmas
{
+ GLboolean IgnoreOptimize; /**< ignore #pragma optimize(on/off) ? */
+ GLboolean IgnoreDebug; /**< ignore #pragma debug(on/off) ? */
GLboolean Optimize; /**< defaults on */
GLboolean Debug; /**< defaults off */
};
@@ -2113,7 +2024,9 @@ struct gl_shader
GLboolean DeletePending;
GLboolean CompileStatus;
GLboolean Main; /**< shader defines main() */
+ GLboolean UnresolvedRefs;
const GLchar *Source; /**< Source code string */
+ GLuint SourceChecksum; /**< for debug/logging purposes */
struct gl_program *Program; /**< Post-compile assembly code */
GLchar *InfoLog;
struct gl_sl_pragmas Pragmas;
@@ -2144,10 +2057,18 @@ struct gl_shader_program
struct gl_program_parameter_list *Varying;
GLboolean LinkStatus; /**< GL_LINK_STATUS */
GLboolean Validated;
+ GLboolean _Used; /**< Ever used for drawing? */
GLchar *InfoLog;
};
+#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */
+#define GLSL_LOG 0x2 /**< Write shaders to files */
+#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */
+#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */
+#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */
+
+
/**
* Context state for GLSL vertex/fragment shaders.
*/
@@ -2156,9 +2077,12 @@ struct gl_shader_state
struct gl_shader_program *CurrentProgram; /**< The user-bound program */
/** Driver-selectable options: */
GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */
+ GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */
GLboolean EmitCondCodes; /**< Use condition codes? */
GLboolean EmitComments; /**< Annotated instructions */
void *MemPool;
+ GLbitfield Flags; /**< Mask of GLSL_x flags */
+ struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
};
@@ -2172,18 +2096,11 @@ struct gl_shared_state
struct _mesa_HashTable *DisplayList; /**< Display lists hash table */
struct _mesa_HashTable *TexObjects; /**< Texture objects hash table */
- /**
- * \name Default texture objects (shared by all multi-texture units)
- */
- /*@{*/
- struct gl_texture_object *Default1D;
- struct gl_texture_object *Default2D;
- struct gl_texture_object *Default3D;
- struct gl_texture_object *DefaultCubeMap;
- struct gl_texture_object *DefaultRect;
- struct gl_texture_object *Default1DArray;
- struct gl_texture_object *Default2DArray;
- /*@}*/
+ /** Default texture objects (shared by all texture units) */
+ struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS];
+
+ /** Fallback texture used when a bound texture is incomplete */
+ struct gl_texture_object *FallbackTex;
/**
* \name Thread safety and statechange notification for texture
@@ -2196,6 +2113,8 @@ struct gl_shared_state
GLuint TextureStateStamp; /**< state notification for shared tex */
/*@}*/
+ /** Default buffer object for vertex arrays that aren't in VBOs */
+ struct gl_buffer_object *NullBufferObj;
/**
* \name Vertex/fragment programs
@@ -2229,8 +2148,9 @@ struct gl_shared_state
struct _mesa_HashTable *FrameBuffers;
#endif
- /** Objects associated with the GL_APPLE_vertex_array_object extension. */
- struct _mesa_HashTable *ArrayObjects;
+#if FEATURE_ARB_sync
+ struct simple_node SyncObjects;
+#endif
void *DriverData; /**< Device driver shared state */
};
@@ -2260,7 +2180,9 @@ struct gl_renderbuffer
GLenum _ActualFormat; /**< The driver-chosen format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
GL_STENCIL_INDEX. */
- GLenum DataType; /**< Type of values passed to the Get/Put functions */
+ GLenum ColorEncoding; /**< GL_LINEAR or GL_SRGB */
+ GLenum ComponentType; /**< GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
+ GL_UNSIGNED_NORMALIZED or GL_INDEX */
GLubyte RedBits; /**< Bits of red per pixel */
GLubyte GreenBits;
GLubyte BlueBits;
@@ -2268,6 +2190,9 @@ struct gl_renderbuffer
GLubyte IndexBits;
GLubyte DepthBits;
GLubyte StencilBits;
+ GLubyte NumSamples;
+
+ GLenum DataType; /**< Type of values passed to the Get/Put functions */
GLvoid *Data; /**< This may not be used by some kinds of RBs */
/* Used to wrap one renderbuffer around another: */
@@ -2342,9 +2267,8 @@ struct gl_renderbuffer
/**
- * A renderbuffer attachment point points to either a texture object
- * (and specifies a mipmap level, cube face or 3D texture slice) or
- * points to a renderbuffer.
+ * A renderbuffer attachment points to either a texture object (and specifies
+ * a mipmap level, cube face or 3D texture slice) or points to a renderbuffer.
*/
struct gl_renderbuffer_attachment
{
@@ -2376,14 +2300,24 @@ struct gl_renderbuffer_attachment
*/
struct gl_framebuffer
{
- _glthread_Mutex Mutex; /**< for thread safety */
- GLuint Name; /* if zero, this is a window system framebuffer */
+ _glthread_Mutex Mutex; /**< for thread safety */
+ /**
+ * If zero, this is a window system framebuffer. If non-zero, this
+ * is a FBO framebuffer; note that for some devices (i.e. those with
+ * a natural pixel coordinate system for FBOs that differs from the
+ * OpenGL/Mesa coordinate system), this means that the viewport,
+ * polygon face orientation, and polygon stipple will have to be inverted.
+ */
+ GLuint Name;
+
GLint RefCount;
GLboolean DeletePending;
- GLvisual Visual; /**< The framebuffer's visual.
- Immutable if this is a window system buffer.
- Computed from attachments if user-made FBO. */
+ /**
+ * The framebuffer's visual. Immutable if this is a window system buffer.
+ * Computed from attachments if user-made FBO.
+ */
+ GLvisual Visual;
GLboolean Initialized;
@@ -2402,9 +2336,10 @@ struct gl_framebuffer
GLfloat _MRD; /**< minimum resolvable difference in Z values */
/*@}*/
- GLenum _Status; /* One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
+ /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
+ GLenum _Status;
- /* Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
+ /** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT];
/* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER
@@ -2466,50 +2401,69 @@ struct gl_program_constants
*/
struct gl_constants
{
- GLint MaxTextureLevels; /**< Maximum number of allowed mipmap levels. */
- GLint Max3DTextureLevels; /**< Maximum number of allowed mipmap levels for 3D texture targets. */
- GLint MaxCubeTextureLevels; /**< Maximum number of allowed mipmap levels for GL_ARB_texture_cube_map */
- GLint MaxArrayTextureLayers; /**< Maximum number of layers in an array texture. */
- GLint MaxTextureRectSize; /* GL_NV_texture_rectangle */
+ GLint MaxTextureLevels; /**< Max mipmap levels. */
+ GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */
+ GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */
+ GLint MaxArrayTextureLayers; /**< Max layers in array textures */
+ GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */
GLuint MaxTextureCoordUnits;
GLuint MaxTextureImageUnits;
- GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
- GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
- GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
+ GLuint MaxVertexTextureImageUnits;
+ GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
+ GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
+ GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
+
GLuint MaxArrayLockSize;
+
GLint SubPixelBits;
- GLfloat MinPointSize, MaxPointSize; /* aliased */
- GLfloat MinPointSizeAA, MaxPointSizeAA; /* antialiased */
+
+ GLfloat MinPointSize, MaxPointSize; /**< aliased */
+ GLfloat MinPointSizeAA, MaxPointSizeAA; /**< antialiased */
GLfloat PointSizeGranularity;
- GLfloat MinLineWidth, MaxLineWidth; /* aliased */
- GLfloat MinLineWidthAA, MaxLineWidthAA; /* antialiased */
+ GLfloat MinLineWidth, MaxLineWidth; /**< aliased */
+ GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */
GLfloat LineWidthGranularity;
+
GLuint MaxColorTableSize;
GLuint MaxConvolutionWidth;
GLuint MaxConvolutionHeight;
+
GLuint MaxClipPlanes;
GLuint MaxLights;
- GLfloat MaxShininess; /* GL_NV_light_max_exponent */
- GLfloat MaxSpotExponent; /* GL_NV_light_max_exponent */
+ GLfloat MaxShininess; /**< GL_NV_light_max_exponent */
+ GLfloat MaxSpotExponent; /**< GL_NV_light_max_exponent */
+
GLuint MaxViewportWidth, MaxViewportHeight;
- struct gl_program_constants VertexProgram; /* GL_ARB_vertex_program */
- struct gl_program_constants FragmentProgram; /* GL_ARB_fragment_program */
- /* shared by vertex and fragment program: */
+
+ struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */
+ struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */
GLuint MaxProgramMatrices;
GLuint MaxProgramMatrixStackDepth;
- /* vertex array / buffer object bounds checking */
+
+ /** vertex array / buffer object bounds checking */
GLboolean CheckArrayBounds;
- /* GL_ARB_draw_buffers */
- GLuint MaxDrawBuffers;
- /* GL_OES_read_format */
- GLenum ColorReadFormat;
- GLenum ColorReadType;
- /* GL_EXT_framebuffer_object */
- GLuint MaxColorAttachments;
- GLuint MaxRenderbufferSize;
- /* GL_ARB_vertex_shader */
- GLuint MaxVertexTextureImageUnits;
- GLuint MaxVarying; /**< Number of float[4] vectors */
+
+ GLuint MaxDrawBuffers; /**< GL_ARB_draw_buffers */
+
+ GLenum ColorReadFormat; /**< GL_OES_read_format */
+ GLenum ColorReadType; /**< GL_OES_read_format */
+
+ GLuint MaxColorAttachments; /**< GL_EXT_framebuffer_object */
+ GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */
+ GLuint MaxSamples; /**< GL_ARB_framebuffer_object */
+
+ GLuint MaxVarying; /**< Number of float[4] varying parameters */
+
+ GLbitfield SupportedBumpUnits; /**> units supporting GL_ATI_envmap_bumpmap as targets */
+
+ /**
+ * Maximum amount of time, measured in nanseconds, that the server can wait.
+ */
+ GLuint64 MaxServerWaitTimeout;
+
+
+ /**< GL_EXT_provoking_vertex */
+ GLboolean QuadsFollowProvokingVertexConvention;
};
@@ -2519,28 +2473,30 @@ struct gl_constants
*/
struct gl_extensions
{
- /**
- * \name Flags to quickly test if certain extensions are available.
- *
- * Not every extension needs to have such a flag, but it's encouraged.
- */
- /*@{*/
GLboolean dummy; /* don't remove this! */
+ GLboolean ARB_copy_buffer;
GLboolean ARB_depth_texture;
+ GLboolean ARB_depth_clamp;
GLboolean ARB_draw_buffers;
+ GLboolean ARB_draw_elements_base_vertex;
GLboolean ARB_fragment_program;
GLboolean ARB_fragment_program_shadow;
GLboolean ARB_fragment_shader;
+ GLboolean ARB_framebuffer_object;
GLboolean ARB_half_float_pixel;
GLboolean ARB_imaging;
+ GLboolean ARB_map_buffer_range;
GLboolean ARB_multisample;
GLboolean ARB_multitexture;
GLboolean ARB_occlusion_query;
GLboolean ARB_point_sprite;
+ GLboolean ARB_seamless_cube_map;
GLboolean ARB_shader_objects;
GLboolean ARB_shading_language_100;
GLboolean ARB_shading_language_120;
GLboolean ARB_shadow;
+ GLboolean ARB_shadow_ambient; /* or GL_ARB_shadow_ambient */
+ GLboolean ARB_sync;
GLboolean ARB_texture_border_clamp;
GLboolean ARB_texture_compression;
GLboolean ARB_texture_cube_map;
@@ -2551,6 +2507,7 @@ struct gl_extensions
GLboolean ARB_texture_mirrored_repeat;
GLboolean ARB_texture_non_power_of_two;
GLboolean ARB_transpose_matrix;
+ GLboolean ARB_vertex_array_object;
GLboolean ARB_vertex_buffer_object;
GLboolean ARB_vertex_program;
GLboolean ARB_vertex_shader;
@@ -2582,6 +2539,7 @@ struct gl_extensions
GLboolean EXT_pixel_buffer_object;
GLboolean EXT_point_parameters;
GLboolean EXT_polygon_offset;
+ GLboolean EXT_provoking_vertex;
GLboolean EXT_rescale_normal;
GLboolean EXT_shadow_funcs;
GLboolean EXT_secondary_color;
@@ -2601,13 +2559,16 @@ struct gl_extensions
GLboolean EXT_texture_lod_bias;
GLboolean EXT_texture_mirror_clamp;
GLboolean EXT_texture_sRGB;
+ GLboolean EXT_texture_swizzle;
GLboolean EXT_timer_query;
GLboolean EXT_vertex_array;
+ GLboolean EXT_vertex_array_bgra;
GLboolean EXT_vertex_array_set;
/* vendor extensions */
GLboolean APPLE_client_storage;
GLboolean APPLE_packed_pixels;
GLboolean APPLE_vertex_array_object;
+ GLboolean ATI_envmap_bumpmap;
GLboolean ATI_texture_mirror_once;
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
@@ -2616,15 +2577,16 @@ struct gl_extensions
GLboolean IBM_multimode_draw_arrays;
GLboolean MESA_pack_invert;
GLboolean MESA_packed_depth_stencil;
- GLboolean MESA_program_debug;
GLboolean MESA_resize_buffers;
GLboolean MESA_ycbcr_texture;
GLboolean MESA_texture_array;
+ GLboolean MESA_texture_signed_rgba;
GLboolean NV_blend_square;
GLboolean NV_fragment_program;
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
GLboolean NV_texgen_reflection;
+ GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
GLboolean NV_vertex_program;
GLboolean NV_vertex_program1_1;
@@ -2635,12 +2597,15 @@ struct gl_extensions
GLboolean SGIS_generate_mipmap;
GLboolean SGIS_texture_edge_clamp;
GLboolean SGIS_texture_lod;
- GLboolean SGIX_shadow;
- GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
- /*@}*/
- /* The extension string */
+#if FEATURE_OES_draw_texture
+ GLboolean OES_draw_texture;
+#endif /* FEATURE_OES_draw_texture */
+#if FEATURE_OES_EGL_image
+ GLboolean OES_EGL_image;
+#endif
+ /** The extension string */
const GLubyte *String;
};
@@ -2660,7 +2625,6 @@ struct gl_matrix_stack
/**
* \name Bits for image transfer operations
- *
* \sa __GLcontextRec::ImageTransferState.
*/
/*@{*/
@@ -2675,7 +2639,7 @@ struct gl_matrix_stack
#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100
#define IMAGE_HISTOGRAM_BIT 0x200
#define IMAGE_MIN_MAX_BIT 0x400
-#define IMAGE_CLAMP_BIT 0x800 /* extra */
+#define IMAGE_CLAMP_BIT 0x800
/** Pixel Transfer ops up to convolution */
@@ -2728,6 +2692,9 @@ struct gl_matrix_stack
#define _NEW_MULTISAMPLE 0x2000000 /**< __GLcontextRec::Multisample */
#define _NEW_TRACK_MATRIX 0x4000000 /**< __GLcontextRec::VertexProgram */
#define _NEW_PROGRAM 0x8000000 /**< __GLcontextRec::VertexProgram */
+#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __GLcontextRec::Current */
+#define _NEW_PROGRAM_CONSTANTS 0x20000000
+#define _NEW_BUFFER_OBJECT 0x40000000
#define _NEW_ALL ~0
/*@}*/
@@ -2810,6 +2777,10 @@ struct gl_matrix_stack
/*@}*/
+/**
+ * Composite state flags
+ */
+/*@{*/
#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \
_NEW_TEXTURE | \
_NEW_POINT | \
@@ -2819,17 +2790,12 @@ struct gl_matrix_stack
#define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \
_NEW_TEXTURE)
-#define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL | _NEW_COLOR_MATRIX)
-
+#define _MESA_NEW_TRANSFER_STATE (_NEW_PIXEL | \
+ _NEW_COLOR_MATRIX)
+/*@}*/
-/*
- * Forward declaration of display list data types:
- */
-union node;
-typedef union node Node;
-
/* This has to be included here. */
#include "dd.h"
@@ -2860,21 +2826,31 @@ struct gl_tnl_module
/*@}*/
};
-/* Strictly this is a tnl/ private concept, but it doesn't seem
+
+/**
+ * Display list flags.
+ * Strictly this is a tnl-private concept, but it doesn't seem
* worthwhile adding a tnl private structure just to hold this one bit
* of information:
*/
-#define MESA_DLIST_DANGLING_REFS 0x1
+#define DLIST_DANGLING_REFS 0x1
+
-/* Provide a location where information about a display list can be
+/** Opaque declaration of display list payload data type */
+union gl_dlist_node;
+
+
+/**
+ * Provide a location where information about a display list can be
* collected. Could be extended with driverPrivate structures,
* etc. in the future.
*/
-struct mesa_display_list
+struct gl_display_list
{
- Node *node;
- GLuint id;
- GLbitfield flags;
+ GLuint Name;
+ GLbitfield Flags; /**< DLIST_x flags */
+ /** The dlist commands are in a linked list of nodes */
+ union gl_dlist_node *Head;
};
@@ -2885,10 +2861,8 @@ struct gl_dlist_state
{
GLuint CallDepth; /**< Current recursion calling depth */
- struct mesa_display_list *CurrentList;
- Node *CurrentListPtr; /**< Head of list being compiled */
- GLuint CurrentListNum; /**< Number of the list being compiled */
- Node *CurrentBlock; /**< Pointer to current block of nodes */
+ struct gl_display_list *CurrentList; /**< List currently being compiled */
+ union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */
GLuint CurrentPos; /**< Index into current block of nodes */
GLvertexformat ListVtxfmt;
@@ -2904,6 +2878,13 @@ struct gl_dlist_state
GLubyte ActiveEdgeFlag;
GLboolean CurrentEdgeFlag;
+
+ struct {
+ /* State known to have been set by the currently-compiling display
+ * list. Used to eliminate some redundant state changes.
+ */
+ GLenum ShadeModel;
+ } Current;
};
@@ -3030,31 +3011,41 @@ struct __GLcontextRec
struct gl_color_table ColorTable[COLORTABLE_MAX];
struct gl_color_table ProxyColorTable[COLORTABLE_MAX];
-#if 0
- struct gl_color_table PostConvolutionColorTable;
- struct gl_color_table ProxyPostConvolutionColorTable;
- struct gl_color_table PostColorMatrixColorTable;
- struct gl_color_table ProxyPostColorMatrixColorTable;
-#endif
-
- struct gl_program_state Program; /**< for vertex or fragment progs */
- struct gl_vertex_program_state VertexProgram; /**< GL_ARB/NV_vertex_program */
- struct gl_fragment_program_state FragmentProgram; /**< GL_ARB/NV_vertex_program */
- struct gl_ati_fragment_shader_state ATIFragmentShader; /**< GL_ATI_fragment_shader */
- struct gl_query_state Query; /**< GL_ARB_occlusion_query */
+ struct gl_program_state Program; /**< general program state */
+ struct gl_vertex_program_state VertexProgram;
+ struct gl_fragment_program_state FragmentProgram;
+ struct gl_ati_fragment_shader_state ATIFragmentShader;
struct gl_shader_state Shader; /**< GLSL shader object state */
+
+ struct gl_query_state Query; /**< occlusion, timer queries */
+
+ struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */
+ struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */
/*@}*/
+ struct gl_meta_state *Meta; /**< for "meta" operations */
+
#if FEATURE_EXT_framebuffer_object
struct gl_renderbuffer *CurrentRenderbuffer;
#endif
GLenum ErrorValue; /**< Last error code */
+
+ /**
+ * Recognize and silence repeated error debug messages in buggy apps.
+ */
+ const char *ErrorDebugFmtString;
+ GLuint ErrorDebugCount;
+
GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
GLbitfield NewState; /**< bitwise-or of _NEW_* flags */
+ GLboolean ViewportInitialized; /**< has viewport size been initialized? */
+
+ GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
+
/** \name Derived state */
/*@{*/
/** Bitwise-or of DD_* flags. Note that this bitfield may be used before
@@ -3066,9 +3057,8 @@ struct __GLcontextRec
GLfloat _ModelViewInvScale;
GLboolean _NeedEyeCoords;
GLboolean _ForceEyeCoords;
- GLenum _CurrentProgram; /* currently executing program */
- GLuint TextureStateTimestamp; /* detect changes to shared state */
+ GLuint TextureStateTimestamp; /**< detect changes to shared state */
struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */
struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */
@@ -3087,6 +3077,12 @@ struct __GLcontextRec
/** software compression/decompression supported or not */
GLboolean Mesa_DXTn;
+ /**
+ * Use dp4 (rather than mul/mad) instructions for position
+ * transformation?
+ */
+ GLboolean mvp_with_dp4;
+
/** Core tnl module support */
struct gl_tnl_module TnlModule;
@@ -3100,7 +3096,7 @@ struct __GLcontextRec
void *swsetup_context;
void *swtnl_context;
void *swtnl_im;
- void *acache_context;
+ struct st_context *st;
void *aelt_context;
/*@}*/
};
@@ -3138,8 +3134,6 @@ enum _verbose
VERBOSE_PRIMS = 0x0400,
VERBOSE_VERTS = 0x0800,
VERBOSE_DISASSEM = 0x1000,
- VERBOSE_GLSL = 0x2000,
- VERBOSE_GLSL_DUMP = 0x4000
};
@@ -3150,7 +3144,4 @@ enum _debug
-#define Elements(x) sizeof(x)/sizeof(*(x))
-
-
-#endif /* TYPES_H */
+#endif /* MTYPES_H */