freedreno/ir3: fix assert with getinfo

Fixes:
dEQP-VK.glsl.texture_functions.query.texturesamples.sampler2dms_fixed_vertex

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>
This commit is contained in:
Rob Clark 2020-02-26 08:21:32 -08:00 committed by Marge Bot
parent c1f4367461
commit ac705edd82

View file

@ -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;
}