summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-01-02 13:44:40 -0500
committerAlyssa Rosenzweig <[email protected]>2020-01-02 15:20:55 -0500
commitc298f25c4efb71b461ef0a93cdc20c468afc7511 (patch)
tree0500cfc47dcb6cbf3bf42f0393ed7d366f4f256d /src
parentd58600c0e0af98fa2173aaa4dc996ea71502208a (diff)
pan/midgard: Fix memory corruption in constant combining
It's a long story... but we'd try to insert constants that weren't there and end up clobbering fields in the bundle following the constant array... Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index d4239157ead..a78bb901b43 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -415,7 +415,7 @@ mir_adjust_constants(midgard_instruction *ins,
/* If the constant is new, check ourselves */
for (unsigned j = 0; j < i; ++j) {
- if (constants[j] == constants[i]) {
+ if (constants[j] == constants[i] && (mask & (1 << j))) {
ok = true;
break;
}