summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-10-05 09:07:46 -0700
committerEric Anholt <[email protected]>2016-10-06 18:09:24 -0700
commitd4ae5ca823227214dd1f536e5f4058bede20b2dd (patch)
treef020f96d93ff05007d78f954100852b82faaae5f /src/gallium/drivers/vc4/vc4_qir.h
parent06cc3dfda49b557b177ea6a5bc4fb87e087df21a (diff)
vc4: Fix live intervals analysis for screening defs in if statements.
If a conditional assignment is only conditioned on the exec mask, that's still screening off the value in the executed channels (and, since we're not storing to the unexcuted channels, we don't care what's in there). Fixes a bunch of extra register pressure on Processing's Ribbons demo, which is failing to allocate.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index 36652167595..4d41c427c10 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -195,6 +195,7 @@ struct qinst {
struct qreg dst;
struct qreg *src;
bool sf;
+ bool cond_is_exec_mask;
uint8_t cond;
};
@@ -835,11 +836,13 @@ qir_ROT_MUL(struct vc4_compile *c, struct qreg val, uint32_t rot)
QPU_SMALL_IMM_MUL_ROT + rot)));
}
-static inline void
+static inline struct qinst *
qir_MOV_cond(struct vc4_compile *c, uint8_t cond,
struct qreg dest, struct qreg src)
{
- qir_MOV_dest(c, dest, src)->cond = cond;
+ struct qinst *mov = qir_MOV_dest(c, dest, src);
+ mov->cond = cond;
+ return mov;
}
static inline struct qinst *