diff options
author | Brian Paul <[email protected]> | 2002-06-15 02:38:15 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-06-15 02:38:15 +0000 |
commit | 4753d60dd070bb08d0116076bcc08025c86ce857 (patch) | |
tree | b1516c35acfa41ae17d575b92b8c776bd530297a /src/mesa/drivers/common | |
parent | 5e54ddc3a69df060c3ca2acbdd45247e30c947d6 (diff) |
Added ctx parameter to _mesa_debug()
Added _mesa_printf()
Updated SetDrawBuffer() function in all drivers (ala 4.0.3)
Import 4.0.3/DRI changes.
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r-- | src/mesa/drivers/common/t_dd_dmatmp.h | 11 | ||||
-rw-r--r-- | src/mesa/drivers/common/t_dd_vbtmp.h | 27 | ||||
-rw-r--r-- | src/mesa/drivers/common/t_dd_vertex.h | 8 |
3 files changed, 27 insertions, 19 deletions
diff --git a/src/mesa/drivers/common/t_dd_dmatmp.h b/src/mesa/drivers/common/t_dd_dmatmp.h index d358c3b0105..b8cf91daf10 100644 --- a/src/mesa/drivers/common/t_dd_dmatmp.h +++ b/src/mesa/drivers/common/t_dd_dmatmp.h @@ -1,4 +1,4 @@ -/* $Id: t_dd_dmatmp.h,v 1.12 2002/02/13 00:53:20 keithw Exp $ */ +/* $Id: t_dd_dmatmp.h,v 1.13 2002/06/15 02:38:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -49,6 +49,7 @@ #define ELTS_VARS #define ALLOC_ELTS( nr ) #define EMIT_ELT( offset, elt ) +#define EMIT_TWO_ELTS( offset, elt0, elt1 ) #define INCR_ELTS( nr ) #define ELT_INIT(prim) #define GET_CURRENT_VB_MAX_ELTS() 0 @@ -480,7 +481,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx, NEW_PRIMITIVE(); ALLOC_ELTS_NEW_PRIMITIVE( quads*6 ); - for ( i = 0 ; i < quads*2 ; i+=2 ) { + for ( i = j-start ; i < j-start+quads*2 ; i+=2 ) { EMIT_TWO_ELTS( 0, (i+0), (i+1) ); EMIT_TWO_ELTS( 2, (i+2), (i+1) ); EMIT_TWO_ELTS( 4, (i+3), (i+2) ); @@ -601,7 +602,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx, NEW_PRIMITIVE(); ALLOC_ELTS_NEW_PRIMITIVE( quads*6 ); - for ( i = 0 ; i < quads*4 ; i+=4 ) { + for ( i = j-start ; i < j-start+quads*4 ; i+=4 ) { EMIT_TWO_ELTS( 0, (i+0), (i+1) ); EMIT_TWO_ELTS( 2, (i+3), (i+1) ); EMIT_TWO_ELTS( 4, (i+2), (i+3) ); @@ -996,7 +997,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx, NEW_PRIMITIVE(); ALLOC_ELTS_NEW_PRIMITIVE( quads*6 ); - for ( i = 0 ; i < quads ; i++, elts += 2 ) { + for ( i = j-start ; i < j-start+quads ; i++, elts += 2 ) { EMIT_TWO_ELTS( 0, elts[0], elts[1] ); EMIT_TWO_ELTS( 2, elts[2], elts[1] ); EMIT_TWO_ELTS( 4, elts[3], elts[2] ); @@ -1064,7 +1065,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx, NEW_PRIMITIVE(); ALLOC_ELTS_NEW_PRIMITIVE( quads * 6 ); - for ( i = 0 ; i < quads ; i++, elts += 4 ) { + for ( i = j-start ; i < j-start+quads ; i++, elts += 4 ) { EMIT_TWO_ELTS( 0, elts[0], elts[1] ); EMIT_TWO_ELTS( 2, elts[3], elts[1] ); EMIT_TWO_ELTS( 4, elts[2], elts[3] ); diff --git a/src/mesa/drivers/common/t_dd_vbtmp.h b/src/mesa/drivers/common/t_dd_vbtmp.h index 8f7b638daf9..d88318c16b3 100644 --- a/src/mesa/drivers/common/t_dd_vbtmp.h +++ b/src/mesa/drivers/common/t_dd_vbtmp.h @@ -1,4 +1,4 @@ -/* $Id: t_dd_vbtmp.h,v 1.17 2002/06/03 16:06:35 brianp Exp $ */ +/* $Id: t_dd_vbtmp.h,v 1.18 2002/06/15 02:38:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -189,15 +189,28 @@ static void TAG(emit)( GLcontext *ctx, } if (DO_SPEC) { - if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) - IMPORT_FLOAT_SPEC_COLORS( ctx ); - spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; - spec_stride = VB->SecondaryColorPtr[0]->StrideB; + if (VB->SecondaryColorPtr[0]) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + IMPORT_FLOAT_SPEC_COLORS( ctx ); + spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; + spec_stride = VB->SecondaryColorPtr[0]->StrideB; + } else { + GLubyte tmp[4]; + spec = &tmp; + spec_stride = 0; + } } if (DO_FOG) { - fog = VB->FogCoordPtr->data; - fog_stride = VB->FogCoordPtr->stride; + if (VB->FogCoordPtr) { + fog = VB->FogCoordPtr->data; + fog_stride = VB->FogCoordPtr->stride; + } + else { + GLfloat tmp = 0; + fog = &tmp; + fog_stride = 0; + } } if (VB->importable_data) { diff --git a/src/mesa/drivers/common/t_dd_vertex.h b/src/mesa/drivers/common/t_dd_vertex.h index ba031fc0bb8..f275856c43b 100644 --- a/src/mesa/drivers/common/t_dd_vertex.h +++ b/src/mesa/drivers/common/t_dd_vertex.h @@ -1,4 +1,4 @@ -/* $Id: t_dd_vertex.h,v 1.11 2002/06/05 16:48:54 brianp Exp $ */ +/* $Id: t_dd_vertex.h,v 1.12 2002/06/15 02:38:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -77,9 +77,3 @@ typedef union { GLubyte ub4[24][4]; } TAG(Vertex), *TAG(VertexPtr); -typedef struct { - GLfloat clip[4]; - GLuint mask; - GLuint pad; /* alignment */ - TAG(Vertex) v; -} TAG(TnlVertex), *TAG(TnlVertexPtr); |