r300/compiler: Enable hardware IF statements for r500 cards.
authorTom Stellard <tstellar@gmail.com>
Tue, 15 Jun 2010 08:42:06 +0000 (01:42 -0700)
committerMarek Olšák <maraeo@gmail.com>
Sat, 3 Jul 2010 02:27:09 +0000 (04:27 +0200)
src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
src/mesa/drivers/dri/r300/r300_reg.h

index 31f556a96afadb16e56e8b48067f968c28df80ea..147b0710dbc5ed63f5f5d5635bf2f11e5b33e1c3 100644 (file)
@@ -111,9 +111,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
        
        debug_program_log(c, "after transform loops");
        
-       rc_emulate_branches(&c->Base);
-
-       debug_program_log(c, "after emulate branches");
+       if (!c->Base.is_r500){
+               rc_emulate_branches(&c->Base);
+               debug_program_log(c, "after emulate branches");
+       }
 
        if (c->Base.is_r500) {
                struct radeon_program_transformation transformations[] = {
index ac93563ed9e1438cd5e5c0cccf16c86615f040e2..f25264b6f2d7d5a2768ec0a72a1c971011b54c10 100644 (file)
@@ -3066,8 +3066,8 @@ enum {
 #   define R500_FC_B_OP0_NONE                          (0 << 24)
 #   define R500_FC_B_OP0_DECR                          (1 << 24)
 #   define R500_FC_B_OP0_INCR                          (2 << 24)
-#   define R500_FC_B_OP1_DECR                          (0 << 26)
-#   define R500_FC_B_OP1_NONE                          (1 << 26)
+#   define R500_FC_B_OP1_NONE                          (0 << 26)
+#   define R500_FC_B_OP1_DECR                          (1 << 26)
 #   define R500_FC_B_OP1_INCR                          (2 << 26)
 #   define R500_FC_IGNORE_UNCOVERED                    (1 << 28)
 #define R500_US_FC_INT_CONST_0                         0x4c00