i965/vec4: don't copy propagate misaligned registers
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 22 Jun 2016 13:13:45 +0000 (15:13 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:51 +0000 (11:26 +0100)
This means we would copy propagate partial reads or writes and that can affect
the result.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 9b76f58fc673ae212a2c7a1c02f321147c8d7b53..e7f6f93f8bdb0fec7456fc828a72b06c02a5c7bd 100644 (file)
@@ -354,6 +354,9 @@ try_copy_propagate(const struct gen_device_info *devinfo,
       return false;
    }
 
+   if (inst->src[arg].offset % REG_SIZE || value.offset % REG_SIZE)
+      return false;
+
    bool has_source_modifiers = value.negate || value.abs;
 
    /* gen6 math and gen7+ SENDs from GRFs ignore source modifiers on