summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-02-26 08:21:32 -0800
committerMarge Bot <[email protected]>2020-02-28 16:53:41 +0000
commitac705edd82996b4176de6a991db38e76a11625a7 (patch)
tree40c118994bd9f796aa016fb93146ce11a181d0cc /src/freedreno/ir3
parentc1f436746182027ce52c59c0efeea3d2a28dea5b (diff)
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>
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r--src/freedreno/ir3/ir3.c5
1 files 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;
}