summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-02-25 17:17:55 -0800
committerMarge Bot <[email protected]>2020-02-28 16:53:41 +0000
commitc1f436746182027ce52c59c0efeea3d2a28dea5b (patch)
tree33deb4a5c35fc29ae5848b0e76aeee81ade14ae6 /src/freedreno
parent4b8e198fd2b5bfcefccd998a94a1f065c91119d3 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/ir3/ir3_ra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c
index cf986e62c1d..35a95fd1050 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)));