Module: Mesa Branch: master Commit: ac705edd82996b4176de6a991db38e76a11625a7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac705edd82996b4176de6a991db38e76a11625a7
Author: Rob Clark <[email protected]> Date: Wed Feb 26 08:21:32 2020 -0800 freedreno/ir3: fix assert with getinfo Fixes: dEQP-VK.glsl.texture_functions.query.texturesamples.sampler2dms_fixed_vertex Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989> --- 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; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
