From 458479fedb3a044aa96ff33806b8b758494de375 Mon Sep 17 00:00:00 2001 From: Aapo Tahkola Date: Fri, 13 Jan 2006 15:03:57 +0000 Subject: Fix invalid tex coord routing and couple other small things. --- src/mesa/drivers/dri/r300/r300_state.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 52fc1581447..a31d0875f6b 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1188,7 +1188,7 @@ void r300_setup_rs_unit(GLcontext *ctx) }; GLuint OutputsWritten; GLuint InputsRead; - int vp_reg, fp_reg, high_rr; + int fp_reg, high_rr; int in_texcoords, col_interp_nr; int i; @@ -1208,17 +1208,14 @@ void r300_setup_rs_unit(GLcontext *ctx) R300_STATECHANGE(r300, rc); R300_STATECHANGE(r300, rr); - vp_reg = fp_reg = in_texcoords = col_interp_nr = high_rr = 0; + fp_reg = in_texcoords = col_interp_nr = high_rr = 0; r300->hw.rr.cmd[R300_RR_ROUTE_0] = 0; r300->hw.rr.cmd[R300_RR_ROUTE_1] = 0; for (i=0;iConst.MaxTextureUnits;i++) { - if (OutputsWritten & (hw_tcl_on ? (1 << (VERT_RESULT_TEX0+i)) : (_TNL_BIT_TEX0<hw.ri.cmd[R300_RI_INTERP_0+i] = 0 | R300_RS_INTERP_USED - | (vp_reg << R300_RS_INTERP_SRC_SHIFT) + | (in_texcoords << R300_RS_INTERP_SRC_SHIFT) | interp_magic[i]; if (InputsRead & (FRAG_BIT_TEX0<Base); //exit(-1); } InputsRead &= ~(FRAG_BIT_TEX0<Base); //exit(-1); } @@ -1253,6 +1254,7 @@ void r300_setup_rs_unit(GLcontext *ctx) InputsRead &= ~FRAG_BIT_COL0; col_interp_nr++; } + out: if (InputsRead & FRAG_BIT_COL1) { if (!(OutputsWritten & (hw_tcl_on ? (1<NewGLState && hw_tcl_on) { rmesa->NewGLState = 0; - if (ctx->VertexProgram._Enabled == GL_FALSE) - _tnl_UpdateFixedFunctionProgram(ctx); + + _tnl_UpdateFixedFunctionProgram(ctx); vp = (struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx); if (vp->translated == GL_FALSE) @@ -1699,10 +1701,10 @@ void r300UpdateShaderStates(r300ContextPtr rmesa) #endif r300_setup_textures(ctx); - r300_setup_rs_unit(ctx); - r300SetupVertexShader(rmesa); r300SetupPixelShader(rmesa); + r300SetupVertexShader(rmesa); + r300_setup_rs_unit(ctx); } /* This is probably wrong for some values, I need to test this -- cgit v1.2.3