aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-06-14 03:30:57 +0000
committerBrian Paul <[email protected]>2006-06-14 03:30:57 +0000
commit62dc134771858638ac38687c16bbb0578d20c419 (patch)
treea001d0132802b8865413993968528addc0282977 /src/mesa
parent3c18d4960728661e4059a015e7deb7c676c5c7b1 (diff)
Rename _TNL_ATTRIB_ATTRIBUTE* to _TNL_ATTRIB_GENERIC*
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast_setup/ss_context.c2
-rw-r--r--src/mesa/tnl/t_context.c2
-rw-r--r--src/mesa/tnl/t_context.h54
-rw-r--r--src/mesa/tnl/t_save_loopback.c2
-rw-r--r--src/mesa/tnl/t_vb_arbshader.c4
5 files changed, 34 insertions, 30 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 99cd7b5a33b..14eaf1d0bf7 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -147,7 +147,7 @@ _swsetup_RenderStart( GLcontext *ctx )
}
}
- if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_ATTRIBUTE, _TNL_LAST_ATTRIBUTE )) {
+ if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC )) {
for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) {
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_ATTRIBUTE(i) )) {
EMIT_ATTR( _TNL_ATTRIB_ATTRIBUTE(i), VARYING_EMIT_STYLE, attribute[i] );
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 671654988b0..b6f5152c741 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -199,7 +199,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE );
if (ctx->ShaderObjects._VertexShaderPresent || ctx->ShaderObjects._FragmentShaderPresent)
- RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_ATTRIBUTE, _TNL_LAST_ATTRIBUTE );
+ RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC );
}
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 6c97fbb7c8d..7f94f071fee 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -115,22 +115,22 @@ enum {
_TNL_ATTRIB_TEX5 = 13,
_TNL_ATTRIB_TEX6 = 14,
_TNL_ATTRIB_TEX7 = 15,
- _TNL_ATTRIB_ATTRIBUTE0 = 16,
- _TNL_ATTRIB_ATTRIBUTE1 = 17,
- _TNL_ATTRIB_ATTRIBUTE2 = 18,
- _TNL_ATTRIB_ATTRIBUTE3 = 19,
- _TNL_ATTRIB_ATTRIBUTE4 = 20,
- _TNL_ATTRIB_ATTRIBUTE5 = 21,
- _TNL_ATTRIB_ATTRIBUTE6 = 22,
- _TNL_ATTRIB_ATTRIBUTE7 = 23,
- _TNL_ATTRIB_ATTRIBUTE8 = 24,
- _TNL_ATTRIB_ATTRIBUTE9 = 25,
- _TNL_ATTRIB_ATTRIBUTE10 = 26,
- _TNL_ATTRIB_ATTRIBUTE11 = 27,
- _TNL_ATTRIB_ATTRIBUTE12 = 28,
- _TNL_ATTRIB_ATTRIBUTE13 = 29,
- _TNL_ATTRIB_ATTRIBUTE14 = 30,
- _TNL_ATTRIB_ATTRIBUTE15 = 31,
+ _TNL_ATTRIB_GENERIC0 = 16,
+ _TNL_ATTRIB_GENERIC1 = 17,
+ _TNL_ATTRIB_GENERIC2 = 18,
+ _TNL_ATTRIB_GENERIC3 = 19,
+ _TNL_ATTRIB_GENERIC4 = 20,
+ _TNL_ATTRIB_GENERIC5 = 21,
+ _TNL_ATTRIB_GENERIC6 = 22,
+ _TNL_ATTRIB_GENERIC7 = 23,
+ _TNL_ATTRIB_GENERIC8 = 24,
+ _TNL_ATTRIB_GENERIC9 = 25,
+ _TNL_ATTRIB_GENERIC10 = 26,
+ _TNL_ATTRIB_GENERIC11 = 27,
+ _TNL_ATTRIB_GENERIC12 = 28,
+ _TNL_ATTRIB_GENERIC13 = 29,
+ _TNL_ATTRIB_GENERIC14 = 30,
+ _TNL_ATTRIB_GENERIC15 = 31,
_TNL_ATTRIB_MAT_FRONT_AMBIENT = 32,
_TNL_ATTRIB_MAT_BACK_AMBIENT = 33,
_TNL_ATTRIB_MAT_FRONT_DIFFUSE = 34,
@@ -149,10 +149,10 @@ enum {
} ;
#define _TNL_ATTRIB_TEX(u) (_TNL_ATTRIB_TEX0 + (u))
-#define _TNL_ATTRIB_ATTRIBUTE(n) (_TNL_ATTRIB_ATTRIBUTE0 + (n))
+#define _TNL_ATTRIB_GENERIC(n) (_TNL_ATTRIB_GENERIC0 + (n))
/* special index used for handing invalid glVertexAttribute() indices */
-#define _TNL_ATTRIB_ERROR (_TNL_ATTRIB_ATTRIBUTE15 + 1)
+#define _TNL_ATTRIB_ERROR (_TNL_ATTRIB_GENERIC15 + 1)
/**
* Handy attribute ranges:
@@ -163,8 +163,8 @@ enum {
#define _TNL_FIRST_TEX _TNL_ATTRIB_TEX0
#define _TNL_LAST_TEX _TNL_ATTRIB_TEX7
-#define _TNL_FIRST_ATTRIBUTE _TNL_ATTRIB_ATTRIBUTE0
-#define _TNL_LAST_ATTRIBUTE _TNL_ATTRIB_ATTRIBUTE15
+#define _TNL_FIRST_GENERIC _TNL_ATTRIB_GENERIC0
+#define _TNL_LAST_GENERIC _TNL_ATTRIB_GENERIC15
#define _TNL_FIRST_MAT _TNL_ATTRIB_MAT_FRONT_AMBIENT
#define _TNL_LAST_MAT _TNL_ATTRIB_MAT_BACK_INDEXES
@@ -359,6 +359,9 @@ struct tnl_save {
};
+/**
+ * A collection of vertex arrays.
+ */
struct tnl_vertex_arrays
{
/* Conventional vertex attribute arrays */
@@ -387,15 +390,15 @@ struct tnl_vertex_arrays
*/
struct vertex_buffer
{
- /* Constant over life of the vertex_buffer.
- */
- GLuint Size;
+ GLuint Size; /**< Max vertices per vertex buffer, constant */
/* Constant over the pipeline.
*/
- GLuint Count; /* for everything except Elts */
+ GLuint Count; /**< Number of vertices currently in buffer */
/* Pointers to current data.
+ * XXX some of these fields alias AttribPtr below and should be removed
+ * such as NormalPtr, TexCoordPtr, FogCoordPtr, etc.
*/
GLuint *Elts;
GLvector4f *ObjPtr; /* _TNL_BIT_POS */
@@ -425,7 +428,8 @@ struct vertex_buffer
};
-/** Describes an individual operation on the pipeline.
+/**
+ * Describes an individual operation on the pipeline.
*/
struct tnl_pipeline_stage
{
diff --git a/src/mesa/tnl/t_save_loopback.c b/src/mesa/tnl/t_save_loopback.c
index 62904ee25aa..b96bb4ec552 100644
--- a/src/mesa/tnl/t_save_loopback.c
+++ b/src/mesa/tnl/t_save_loopback.c
@@ -292,7 +292,7 @@ void _tnl_loopback_vertex_list( GLcontext *ctx,
GLuint i, nr = 0;
/* conventional + generic attributes */
- for (i = 0 ; i <= _TNL_ATTRIB_ATTRIBUTE15 ; i++) {
+ for (i = 0 ; i <= _TNL_ATTRIB_GENERIC15 ; i++) {
if (list->attrsz[i]) {
la[nr].target = i;
la[nr].sz = list->attrsz[i];
diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c
index c43b890f19a..ec8dd5e2f57 100644
--- a/src/mesa/tnl/t_vb_arbshader.c
+++ b/src/mesa/tnl/t_vb_arbshader.c
@@ -155,7 +155,7 @@ static void fetch_input_vec4 (struct gl2_program_intf **pro, GLuint index, GLuin
static GLvoid
fetch_gen_attrib (struct gl2_program_intf **pro, GLuint index, GLuint i, struct vertex_buffer *vb)
{
- const GLuint attr = _TNL_ATTRIB_ATTRIBUTE0 + index;
+ const GLuint attr = _TNL_ATTRIB_GENERIC0 + index;
const GLubyte *ptr = (const GLubyte *) (vb->AttribPtr[attr]->data);
const GLuint stride = vb->AttribPtr[attr]->stride;
const GLfloat *data = (const GLfloat *) (ptr + stride * i);
@@ -254,7 +254,7 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag
vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = vb->TexCoordPtr[i];
vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ];
for (i = 0; i < MAX_VARYING_VECTORS; i++)
- vb->AttribPtr[_TNL_ATTRIB_ATTRIBUTE0 + i] = vb->VaryingPtr[i];
+ vb->AttribPtr[_TNL_ATTRIB_GENERIC0 + i] = vb->VaryingPtr[i];
store->ormask = 0;
store->andmask = CLIP_FRUSTUM_BITS;