summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-08-13 15:44:14 -0700
committerSamuel Iglesias Gonsálvez <[email protected]>2017-01-03 11:26:51 +0100
commit0fec5e9867fe46c543509f6555d31b8ada835f8e (patch)
tree4ebc8c979391c8dca63b51493acb141789b14e57 /src/mesa/drivers/dri
parent8eea41e75d86bfe9bef5f69b25ad797da236a008 (diff)
i965/vec4: don't constant propagate 64-bit immediates
v2: Also check if the instruction source target is 64-bit. (Samuel) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp7
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 739f33eed34..55413abbc6e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -151,6 +151,13 @@ try_constant_propagate(const struct gen_device_info *devinfo,
if (value.file != IMM)
return false;
+ /* 64-bit types can't be used except for one-source instructions, which
+ * higher levels should have constant folded away, so there's no point in
+ * propagating immediates here.
+ */
+ if (type_sz(value.type) == 8 || type_sz(inst->src[arg].type) == 8)
+ return false;
+
if (value.type == BRW_REGISTER_TYPE_VF) {
/* The result of bit-casting the component values of a vector float
* cannot in general be represented as an immediate.