diff options
author | Iago Toral Quiroga <[email protected]> | 2016-06-23 08:34:53 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2017-01-03 11:26:51 +0100 |
commit | 6637312847527783eff9e315362ccd8cc87f595d (patch) | |
tree | 4287fee5c170f9124441e49bf5abc71fd13e7e81 /src | |
parent | 70cc6b0a022c1bfd8d17d5e931b276cb2ef2a456 (diff) |
i965/vec4: Prevent copy propagation from violating pre-gen8 restrictions
In gen < 8 instructions that write more than one register need to read
more than one register too. Make sure we don't break that restriction
by copy propagating from a uniform.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp index 4ef34f25dfc..fba71ae3dc2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp @@ -324,6 +324,13 @@ try_copy_propagate(const struct gen_device_info *devinfo, value.file != ATTR) return false; + /* In gen < 8 instructions that write 2 registers also need to read 2 + * registers. Make sure we don't break that restriction by copy + * propagating from a uniform. + */ + if (devinfo->gen < 8 && inst->size_written > REG_SIZE && is_uniform(value)) + return false; + /* If the type of the copy value is different from the type of the * instruction then the swizzles and writemasks involved don't have the same * meaning and simply replacing the source would produce different semantics. |