diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2005-03-16 22:32:48 +0000 |
---|---|---|
committer | Aapo Tahkola <aet@rasterburn.org> | 2005-03-16 22:32:48 +0000 |
commit | c1aa3d1e6f6fd3971df93b11d4db139bec824c91 (patch) | |
tree | cf83cdfe2f95bd8f9f78a34185d05dc74313ce0d /src/mesa/drivers/dri/r300/r300_state.c | |
parent | dd9da8cdb58873daf51dd60839aa2b514a737c47 (diff) |
Proper VAP output configuration as R300_RS_ROUTE_0_COLOR became optional and broke arbvptorus(takes no input color but produces output color). Also removing some useless code.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 73005eb82d..716f62346a 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1356,7 +1356,8 @@ void r300_setup_textures(GLcontext *ctx) /*if(ctx->Texture.Unit[i].Enabled == 0) continue;*/ if( ((r300->state.render_inputs & (_TNL_BIT_TEX0<<i))!=0) != ((ctx->Texture.Unit[i].Enabled)!=0) ) { - WARN_ONCE("Mismatch between render_inputs and ctx->Texture.Unit[i].Enabled value.\n"); + WARN_ONCE("Mismatch between render_inputs and ctx->Texture.Unit[i].Enabled value(%d vs %d).\n", + ((r300->state.render_inputs & (_TNL_BIT_TEX0<<i))!=0), ((ctx->Texture.Unit[i].Enabled)!=0)); } if(r300->state.render_inputs & (_TNL_BIT_TEX0<<i)) { @@ -1422,6 +1423,7 @@ void r300_setup_rs_unit(GLcontext *ctx) 0x00, 0x00 }; + GLuint vap_outputs; /* This needs to be rewritten - it is a hack at best */ @@ -1433,6 +1435,11 @@ void r300_setup_rs_unit(GLcontext *ctx) cur_reg = 0; r300->hw.rr.cmd[R300_RR_ROUTE_0] = 0; + if (r300->current_vp != NULL) + vap_outputs = r300->current_vp->outputs; + else + vap_outputs = r300->state.render_inputs; + for (i=0;i<ctx->Const.MaxTextureUnits;i++) { r300->hw.ri.cmd[R300_RI_INTERP_0+i] = 0 | R300_RS_INTERP_USED @@ -1450,7 +1457,7 @@ void r300_setup_rs_unit(GLcontext *ctx) cur_reg++; } } - if (r300->state.render_inputs & _TNL_BIT_COLOR0) + if (vap_outputs & _TNL_BIT_COLOR0) r300->hw.rr.cmd[R300_RR_ROUTE_0] |= 0 | R300_RS_ROUTE_0_COLOR | (cur_reg << R300_RS_ROUTE_0_COLOR_DEST_SHIFT); |