After

commit 37924cf175b5f61ca85dab685ec5d7879519ebc4
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Sat May 3 22:08:11 2008 +1000

    r300: update r300 rs unit for swtcl need to fix r500 most likely

Wow framerates drop to around 1/10. The attached patch brings it back to normal. I'm not sure why this has so huge impact on performance, nor what this patch was about in the first place, so some review seems sensible.

Markus
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index cb39ce0..40b7850 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1626,8 +1626,6 @@ static void r300SetupRSUnit(GLcontext * ctx)
 		r300->hw.rr.cmd[R300_RR_INST_0 + fp_reg] = 0;
 		if (InputsRead & (FRAG_BIT_TEX0 << i)) {
 
-			rs_tex_count += count;
-
 			//assert(r300->state.texture.tc_count != 0);
 			r300->hw.rr.cmd[R300_RR_INST_0 + fp_reg] |= R300_RS_INST_TEX_CN_WRITE | i	/* source INTERP */
 			    | (fp_reg << R300_RS_INST_TEX_ADDR_SHIFT);
@@ -1641,6 +1639,10 @@ static void r300SetupRSUnit(GLcontext * ctx)
 				WARN_ONCE("fragprog wants coords for tex%d, vp doesn't provide them!\n", i);
 			}
 		}
+		/* Need to count all coords enabled at vof */
+		if (R300_OUTPUTS_WRITTEN_TEST(OutputsWritten, VERT_RESULT_TEX0 + i, _TNL_ATTRIB_TEX(i))) {
+			rs_tex_count += count;
+		}
 	}
 
 	if (InputsRead & FRAG_BIT_COL0) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to