r300/compiler: Hax around instructions limits in mirroring code.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 13 Apr 2010 01:23:17 +0000 (18:23 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 13 Apr 2010 01:24:05 +0000 (18:24 -0700)
Stuff's starting to show up in arbnpot.

src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c

index d06429254d89ef4c852fa252938e9b010f25792f..a5814875bdb49f60ca96203b7bc7721ec8a1f394 100644 (file)
@@ -110,6 +110,16 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
                c->Base.SwizzleCaps = &r300_swizzle_caps;
        }
 
+       /* As a stopgap, run the ALU lowering sequence once again.
+        *
+        * The entire lowering sequence should be fixed so that these little
+        * inter-dependent instructions aren't an issue. I suppose we'd need a
+        * list of safe instructions first... */
+       struct radeon_program_transformation maths_lowering[] = {
+               { &radeonTransformALU, 0 }
+       };
+       radeonLocalTransform(&c->Base, 1, maths_lowering);
+
        if (c->Base.Debug) {
                fprintf(stderr, "Fragment Program: After native rewrite:\n");
                rc_print_program(&c->Base.Program);