diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-06 18:30:00 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-06 18:30:00 +0000 |
commit | 14ec34d64733478b773190cb62be37b7b2871a7f (patch) | |
tree | 3935796705a0f28df41cf5fe9d79284448235bb9 /src/mesa/drivers/dri/i965/brw_draw.c | |
parent | 2216aac8ea2ab90cdf71658379f88f30131426c5 (diff) |
Simplify the immediate and displaylist code. Treat VertexAttrib*ARB
as non-aliasing and cope with the >32 attributes that result, taking
materials into account.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index a98e08e363..104404b301 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -160,7 +160,7 @@ static void update_current_size( struct gl_client_array *array) const GLfloat *ptr = (const GLfloat *)array->Ptr; assert(array->StrideB == 0); - assert(array->Type == GL_FLOAT); + assert(array->Type == GL_FLOAT || array->Type == GL_UNSIGNED_BYTE); if (ptr[3] != 1.0) array->Size = 4; @@ -192,17 +192,12 @@ static void brw_merge_inputs( struct brw_context *brw, if (arrays[i] && arrays[i]->Enabled) { brw->vb.inputs[i].glarray = arrays[i]; - brw->vb.info.varying[i/32] |= 1 << (i%32); + brw->vb.info.varying |= 1 << i; } else { brw->vb.inputs[i].glarray = ¤t_values[i]; - - /* XXX: This will change on the Mesa trunk as Brian has moved - * edgeflag, index into this range: - */ - if (i < VERT_ATTRIB_GENERIC0) - update_current_size(¤t_values[i]); + update_current_size(¤t_values[i]); } brw->vb.info.sizes[i/16] |= (inputs[i].glarray->Size - 1) << ((i%16) * 2); @@ -213,7 +208,7 @@ static void brw_merge_inputs( struct brw_context *brw, if (memcmp(brw->vb.info.sizes, old.sizes, sizeof(old.sizes)) != 0) brw->state.dirty.brw |= BRW_NEW_INPUT_DIMENSIONS; - if (memcmp(brw->vb.info.varying, old.varying, sizeof(old.varying)) != 0) + if (brw->vb.info.varying != old.varying) brw->state.dirty.brw |= BRW_NEW_INPUT_VARYING; } |