summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qpu.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-12-09 16:34:37 -0800
committerEric Anholt <eric@anholt.net>2014-12-09 18:32:36 -0800
commitcff8c96a0d418f41e00aa97a13dc55e3ed213eb7 (patch)
tree44008833a3405db32659e3be07220541c98a0dad /src/gallium/drivers/vc4/vc4_qpu.c
parent25db8729dc53b60ee0caade5e797e99d6ad13fa3 (diff)
downloadexternal_mesa3d-cff8c96a0d418f41e00aa97a13dc55e3ed213eb7.zip
external_mesa3d-cff8c96a0d418f41e00aa97a13dc55e3ed213eb7.tar.gz
external_mesa3d-cff8c96a0d418f41e00aa97a13dc55e3ed213eb7.tar.bz2
vc4: Refuse to merge instructions involving 32-bit immediate loads.
An immediate load overwrites the mul and add operations, so you can't merge with them.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c
index 6daa072..faf8790 100644
--- a/src/gallium/drivers/vc4/vc4_qpu.c
+++ b/src/gallium/drivers/vc4/vc4_qpu.c
@@ -356,6 +356,11 @@ qpu_merge_inst(uint64_t a, uint64_t b)
if (qpu_num_sf_accesses(a) && qpu_num_sf_accesses(b))
return 0;
+ if (QPU_GET_FIELD(a, QPU_SIG) == QPU_SIG_LOAD_IMM ||
+ QPU_GET_FIELD(b, QPU_SIG) == QPU_SIG_LOAD_IMM) {
+ return 0;
+ }
+
ok = ok && merge_fields(&merge, a, b, QPU_SIG_MASK,
QPU_SET_FIELD(QPU_SIG_NONE, QPU_SIG));