r600g: PV/PS have cycle restrictions in scalar operations
authorDave Airlie <airlied@redhat.com>
Sat, 23 Apr 2011 22:30:08 +0000 (08:30 +1000)
committerDave Airlie <airlied@redhat.com>
Sat, 23 Apr 2011 22:30:08 +0000 (08:30 +1000)
In the R600 ISA document:
Section 4.7.5 Cycle restrictions for the ALU.trans states that
PV/PS have cycle restrictions wrt constants.

This is part of a fix for the LIT tests

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_asm.c

index 7e854b1b81d8ee97f1e8bdcbb3d659fe5d33e206..4cdd1ed698f071ae077daa8b05f2d71d74a5c48e 100644 (file)
@@ -709,8 +709,12 @@ static int check_scalar(struct r600_bc *bc, struct r600_bc_alu *alu,
                        if (r)
                                return r;
                }
-               // Constants already processed
-               // No restrictions on PV, PS
+               // PV PS restrictions
+               if (const_count && (sel == 254 || sel == 255)) {
+                       cycle = cycle_for_bank_swizzle_scl[bank_swizzle][src];
+                       if (cycle < const_count)
+                               return -1;
+               }
        }
        return 0;
 }