From 7a7ac8cd40938c19d52589dfe541b6c511e71869 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 23 Aug 2021 17:18:55 -0700 Subject: [PATCH] freedreno/ir3: Fix reg size validation 8b types also live in half-regs Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_validate.c b/src/freedreno/ir3/ir3_validate.c index fb52aa16714..e2614c0e6cc 100644 --- a/src/freedreno/ir3/ir3_validate.c +++ b/src/freedreno/ir3/ir3_validate.c @@ -158,7 +158,7 @@ validate_dst(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr, #define validate_reg_size(ctx, reg, type) \ validate_assert( \ - ctx, type_size(type) == (((reg)->flags & IR3_REG_HALF) ? 16 : 32)) + ctx, (type_size(type) <= 16) == !!((reg)->flags & IR3_REG_HALF)) static void validate_instr(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr)