From ac705edd82996b4176de6a991db38e76a11625a7 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 26 Feb 2020 08:21:32 -0800 Subject: [PATCH] freedreno/ir3: fix assert with getinfo Fixes: dEQP-VK.glsl.texture_functions.query.texturesamples.sampler2dms_fixed_vertex Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index f8cfc6bb3c0..0dbe9bba460 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -462,7 +462,8 @@ static int emit_cat5(struct ir3_instruction *instr, void *ptr, struct ir3_register *src2; instr_cat5_t *cat5 = ptr; - iassert((instr->regs_count == 2) || + iassert((instr->regs_count == 1) || + (instr->regs_count == 2) || (instr->regs_count == 3) || (instr->regs_count == 4)); @@ -470,7 +471,7 @@ static int emit_cat5(struct ir3_instruction *instr, void *ptr, src1 = instr->regs[2]; src2 = instr->regs_count > 3 ? instr->regs[3] : NULL; } else { - src1 = instr->regs[1]; + src1 = instr->regs_count > 1 ? instr->regs[1] : NULL; src2 = instr->regs_count > 2 ? instr->regs[2] : NULL; } -- 2.30.2