summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-07-06 17:53:44 +0200
committermichal <michal@michal-laptop.(none)>2007-07-06 17:53:44 +0200
commit3b8bc1f46758d4da9155419fcf558a493e729501 (patch)
tree0dbfb4ae1ed6b49caaed3e662b27db30fe2e8801 /src/mesa/main/mtypes.h
parentffe58739da9eee2e99682747cc8f26e412c87430 (diff)
parentffa2659204121f703208782ff225a22e0c21b173 (diff)
downloadexternal_mesa3d-3b8bc1f46758d4da9155419fcf558a493e729501.zip
external_mesa3d-3b8bc1f46758d4da9155419fcf558a493e729501.tar.gz
external_mesa3d-3b8bc1f46758d4da9155419fcf558a493e729501.tar.bz2
Merge branch 'master' of git+ssh://michal@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h72
1 files changed, 55 insertions, 17 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2a85563..c150aae 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -38,8 +38,8 @@
#include "glheader.h"
#include <GL/internal/glcore.h> /* __GLcontextModes (GLvisual) */
#include "config.h" /* Hardwired parameters */
-#include "glapitable.h"
-#include "glthread.h"
+#include "glapi/glapitable.h"
+#include "glapi/glthread.h"
#include "math/m_matrix.h" /* GLmatrix */
#include "bitset.h"
@@ -1128,7 +1128,7 @@ struct gl_stencil_attrib
};
-#define NUM_TEXTURE_TARGETS 5 /* 1D, 2D, 3D, CUBE and RECT */
+#define NUM_TEXTURE_TARGETS 7 /* 1D, 2D, 3D, CUBE, RECT, 1D_STACK, and 2D_STACK */
/**
* An index for each type of texture object
@@ -1139,6 +1139,8 @@ struct gl_stencil_attrib
#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
/*@}*/
/**
@@ -1151,6 +1153,8 @@ struct gl_stencil_attrib
#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX)
#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_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)
/*@}*/
@@ -1287,15 +1291,22 @@ struct gl_texture_format
* GL_DEPTH_COMPONENT.
*/
GLenum DataType; /**< GL_FLOAT or GL_UNSIGNED_NORMALIZED_ARB */
- GLubyte RedBits; /**< Bits per texel component */
- GLubyte GreenBits; /**< These are just rough approximations for */
- GLubyte BlueBits; /**< compressed texture formats. */
+
+ /**
+ * Bits per texel component. These are just rough approximations
+ * for compressed texture formats.
+ */
+ /*@{*/
+ GLubyte RedBits;
+ GLubyte GreenBits;
+ GLubyte BlueBits;
GLubyte AlphaBits;
GLubyte LuminanceBits;
GLubyte IntensityBits;
GLubyte IndexBits;
GLubyte DepthBits;
GLubyte StencilBits; /**< GL_EXT_packed_depth_stencil */
+ /*@}*/
GLuint TexelBytes; /**< Bytes per texel, 0 if compressed format */
@@ -1394,7 +1405,6 @@ struct gl_texture_image
*/
struct gl_texture_object
{
- _glthread_Mutex Mutex; /**< for thread safety */
GLint RefCount; /**< reference count */
GLuint Name; /**< the user-visible texture object ID */
GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
@@ -1417,11 +1427,15 @@ struct gl_texture_object
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.
+ */
GLenum DepthMode; /**< GL_ARB_depth_texture */
GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */
GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */
GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */
- GLboolean Complete; /**< Is texture object complete? */
+ GLboolean _Complete; /**< Is texture object complete? */
/** Actual texture images, indexed by [cube face] and [mipmap level] */
struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
@@ -1488,7 +1502,7 @@ struct gl_texture_unit
GLbitfield _GenBitT;
GLbitfield _GenBitR;
GLbitfield _GenBitQ;
- GLbitfield _GenFlags; /**< bitwise or of GenBit[STRQ] */
+ GLbitfield _GenFlags; /**< bitwise or of _GenBit[STRQ] */
GLfloat ObjectPlaneS[4];
GLfloat ObjectPlaneT[4];
GLfloat ObjectPlaneR[4];
@@ -1521,19 +1535,28 @@ struct gl_texture_unit
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 */
struct gl_texture_object *_Current; /**< Points to really enabled tex obj */
- struct gl_texture_object Saved1D; /**< only used by glPush/PopAttrib */
+ /** These are used for glPush/PopAttrib */
+ /*@{*/
+ struct gl_texture_object Saved1D;
struct gl_texture_object Saved2D;
struct gl_texture_object Saved3D;
struct gl_texture_object SavedCubeMap;
struct gl_texture_object SavedRect;
+ struct gl_texture_object Saved1DArray;
+ struct gl_texture_object Saved2DArray;
+ /*@}*/
- /* GL_SGI_texture_color_table */
+ /** GL_SGI_texture_color_table */
+ /*@{*/
struct gl_color_table ColorTable;
struct gl_color_table ProxyColorTable;
GLboolean ColorTableEnabled;
+ /*@}*/
};
struct texenvprog_cache_item {
@@ -1573,6 +1596,8 @@ struct gl_texture_attrib
struct gl_texture_object *Proxy3D;
struct gl_texture_object *ProxyCubeMap;
struct gl_texture_object *ProxyRect;
+ struct gl_texture_object *Proxy1DArray;
+ struct gl_texture_object *Proxy2DArray;
/** GL_EXT_shared_texture_palette */
GLboolean SharedPalette;
@@ -1879,6 +1904,7 @@ struct gl_program
GLbitfield InputsRead; /**< Bitmask of which input regs are read */
GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */
GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */
+ GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
/** Named parameters, constants, etc. from program text */
struct gl_program_parameter_list *Parameters;
@@ -2157,6 +2183,8 @@ struct gl_shared_state
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;
/*@}*/
/**
@@ -2323,17 +2351,24 @@ struct gl_renderbuffer
*/
struct gl_renderbuffer_attachment
{
- GLenum Type; /* GL_NONE or GL_TEXTURE or GL_RENDERBUFFER_EXT */
+ GLenum Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */
GLboolean Complete;
- /* IF Type == GL_RENDERBUFFER_EXT: */
+ /**
+ * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the
+ * application supplied renderbuffer object.
+ */
struct gl_renderbuffer *Renderbuffer;
- /* IF Type == GL_TEXTURE: */
+ /**
+ * If \c Type is \c GL_TEXTURE, this stores a pointer to the application
+ * supplied texture object.
+ */
struct gl_texture_object *Texture;
- GLuint TextureLevel;
- GLuint CubeMapFace; /* 0 .. 5, for cube map textures */
- GLuint Zoffset; /* for 3D textures */
+ GLuint TextureLevel; /**< Attached mipmap level. */
+ GLuint CubeMapFace; /**< 0 .. 5, for cube map textures. */
+ GLuint Zoffset; /**< Slice for 3D textures, or layer for both 1D
+ * and 2D array textures */
};
@@ -2439,6 +2474,7 @@ 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 */
GLuint MaxTextureCoordUnits;
GLuint MaxTextureImageUnits;
@@ -2498,6 +2534,7 @@ struct gl_extensions
GLboolean ARB_depth_texture;
GLboolean ARB_draw_buffers;
GLboolean ARB_fragment_program;
+ GLboolean ARB_fragment_program_shadow;
GLboolean ARB_fragment_shader;
GLboolean ARB_half_float_pixel;
GLboolean ARB_imaging;
@@ -2587,6 +2624,7 @@ struct gl_extensions
GLboolean MESA_program_debug;
GLboolean MESA_resize_buffers;
GLboolean MESA_ycbcr_texture;
+ GLboolean MESA_texture_array;
GLboolean NV_blend_square;
GLboolean NV_fragment_program;
GLboolean NV_light_max_exponent;