summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-01-18 13:44:26 -0800
committerMarge Bot <[email protected]>2020-02-01 02:40:22 +0000
commitb0293af7a5d821776e7e90e3892015581c497810 (patch)
treee54921807953b6276635e987ccb2f3c657afe95e /src/freedreno
parentad2587d3c8885ce4aa0403269268a1c0ab8c2cac (diff)
freedreno/ir3: don't precolor unused inputs
This apparently can happen with gs/tess. And will cause problems with two-pass-ra, so lets just skip them. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/ir3/ir3_ra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c
index 0d1028a76d7..ff357e91fb7 100644
--- a/src/freedreno/ir3/ir3_ra.c
+++ b/src/freedreno/ir3/ir3_ra.c
@@ -1111,6 +1111,7 @@ ra_precolor(struct ir3_ra_ctx *ctx, struct ir3_instruction **precolor, unsigned
for (unsigned i = 0; i < nprecolor; i++) {
if (precolor[i] && !(precolor[i]->flags & IR3_INSTR_UNUSED)) {
struct ir3_instruction *instr = precolor[i];
+
struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip];
debug_assert(!(instr->regs[0]->flags & (IR3_REG_HALF | IR3_REG_HIGH)));
@@ -1175,7 +1176,7 @@ retry:
for (unsigned i = 0; i < nprecolor; i++) {
struct ir3_instruction *instr = precolor[i];
- if (!instr)
+ if (!instr || (instr->flags & IR3_INSTR_UNUSED))
continue;
struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip];