r600g: fix valgrind warning on Cayman
authorMarek Olšák <maraeo@gmail.com>
Fri, 5 Apr 2013 12:22:42 +0000 (14:22 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 10 Apr 2013 19:56:51 +0000 (21:56 +0200)
Warning: "Conditional jump or move depends on uninitialised value(s)".

src/gallium/drivers/r600/r600_asm.c

index 26a848ad1aa26225d439da7011e00c0ba725a11d..64e052b6fcadbb2db5a7e957e9197bfad9ecf6dc 100644 (file)
@@ -524,7 +524,7 @@ static int check_and_set_bank_swizzle(struct r600_bytecode *bc,
                } else
                        r = 0;
 
-               if (!r && slots[4] && max_slots == 5) {
+               if (!r && max_slots == 5 && slots[4]) {
                        r = check_scalar(bc, slots[4], &bs, bank_swizzle[4]);
                }
                if (!r) {