From c1f436746182027ce52c59c0efeea3d2a28dea5b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 25 Feb 2020 17:17:55 -0800 Subject: [PATCH] freedreno/ir3: don't precolor unassigned inputs Fixes crash seen in: dEQP-VK.glsl.conversions.matrix_to_matrix.mat4_to_mat3x4_vertex Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_ra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index cf986e6..35a95fd 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -1273,6 +1273,9 @@ ra_precolor(struct ir3_ra_ctx *ctx, struct ir3_instruction **precolor, unsigned if (precolor[i] && !(precolor[i]->flags & IR3_INSTR_UNUSED)) { struct ir3_instruction *instr = precolor[i]; + if (instr->regs[0]->num == INVALID_REG) + continue; + struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip]; debug_assert(!(instr->regs[0]->flags & (IR3_REG_HALF | IR3_REG_HIGH))); -- 2.7.4