With the attached patch I get in wow with enabled pixel shaders with my rv370 10-15% better frame rates. Its mostly because the global "terrain" shader uses 4 indirection with this patch, without it gets optimized to 1. I'm not sure what exactly goes on. My best guess is the more indirection the more silicon gets used (better parallelizable). If that's the cause we should try to use as many indirection fit into the hardware as possible (perhaps even adding indirections). The easiest way would be to translate the shader multiple times with increasing optimization until it fits into the hardware.

Markus
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index c664fb6..2df297a 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -964,11 +964,13 @@ static void emit_tex(struct r300_fragment_program *fp,
 		/* Use a temp that hasn't been used in this node, rather
 		 * than causing an indirection
 		 */
+		/*
 		if (uin & (1 << hwdest)) {
 			free_hw_temp(fp, hwdest);
 			hwdest = get_hw_temp_tex(fp);
 			cs->temps[REG_GET_INDEX(dest)].reg = hwdest;
 		}
+		*/
 	} else {
 		hwdest = 0;
 		unit = 0;
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to