aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-09 10:40:01 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-12 12:43:03 -0700
commit14b5b9ac38518ff56f6b11feefbc60b049a5c4fe (patch)
tree2aaf86887f7836d53eca7af0f43baa90fc16e8d0 /src/panfrost
parentc690b37d76480e6b8c3a158fc51e7255acf2d841 (diff)
pan/midgard: Extend liveness analysis to trinary ops
Fixes RA fails with multiple indirect SSBO writes. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard_ra.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index a669168eba4..a44d342c205 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -636,12 +636,8 @@ allocate_registers(compiler_context *ctx, bool *spilled)
* invocations, and if there are none, the source dies
* */
- int sources[2] = {
- ins->ssa_args.src[0], ins->ssa_args.src[1]
- };
-
- for (int src = 0; src < 2; ++src) {
- int s = sources[src];
+ for (int src = 0; src < ARRAY_SIZE(ins->ssa_args.src); ++src) {
+ int s = ins->ssa_args.src[src];
if (s < 0) continue;