summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-05-16 08:36:28 +0000
committerKeith Whitwell <[email protected]>2005-05-16 08:36:28 +0000
commit4cf20d923627aa5f8fdce129b4259eef97f230c7 (patch)
treeb171166e44fcfa596701d25ca187309b36244a4d /src/mesa/drivers/dri
parent72a313902bc8eca4b05641695877b255b9a5f06c (diff)
Apply r200 tcl fix to radeon - compiles but untested.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index d1b66c19a1a..6eb35c0f27f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -293,6 +293,7 @@ static GLboolean radeon_run_tcl_render( GLcontext *ctx,
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
+ GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
GLuint i;
/* TODO: separate this from the swtnl pipeline
@@ -303,8 +304,31 @@ static GLboolean radeon_run_tcl_render( GLcontext *ctx,
if (VB->Count == 0)
return GL_FALSE;
+ /* NOTE: inputs != tnl->render_inputs - these are the untransformed
+ * inputs.
+ */
+ if (ctx->Light.Enabled) {
+ inputs |= VERT_BIT_NORMAL;
+ if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
+ inputs |= VERT_BIT_COLOR1;
+ }
+ }
+
+ if ( ctx->Fog.FogCoordinateSource == GL_FOG_COORD ) {
+ inputs |= VERT_BIT_FOG;
+ }
+
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits; i++) {
+ if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (rmesa->TexGenNeedNormals[i]) {
+ inputs |= VERT_BIT_NORMAL;
+ }
+ inputs |= VERT_BIT_TEX(i);
+ }
+ }
+
radeonReleaseArrays( ctx, ~0 );
- radeonEmitArrays( ctx, tnl->render_inputs );
+ radeonEmitArrays( ctx, inputs );
rmesa->tcl.Elts = VB->Elts;