r600g: Check comp_mask before merging export instructions
authorVincent Lejeune <vljn@ovi.com>
Sun, 3 Mar 2013 20:35:38 +0000 (21:35 +0100)
committerVincent Lejeune <vljn@ovi.com>
Sun, 3 Mar 2013 20:39:51 +0000 (21:39 +0100)
Fixes a llvm uncovered (rare) bug where consecutive exports were
merged even if they have incompatible mask.

src/gallium/drivers/r600/r600_asm.c

index b5a29cb..cb3e7a6 100644 (file)
@@ -145,6 +145,7 @@ int r600_bytecode_add_output(struct r600_bytecode *bc,
                output->swizzle_y == bc->cf_last->output.swizzle_y &&
                output->swizzle_z == bc->cf_last->output.swizzle_z &&
                output->swizzle_w == bc->cf_last->output.swizzle_w &&
+               output->comp_mask == bc->cf_last->output.comp_mask &&
                (output->burst_count + bc->cf_last->output.burst_count) <= 16) {
 
                if ((output->gpr + output->burst_count) == bc->cf_last->output.gpr &&