From 9c0740211dd67604bd42798af6d79840d3325bbe Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 19 Jul 2023 18:22:02 -0400 Subject: [PATCH] nir/lower_blend: Fix 32-bit logicops nir_const_value_for_int asserts signed bounds on the input, but we pass in an unsigned value that would be out-of-bounds for 32-bit channels, causing the assert to fail for 32-bit channel formats. Fixes dEQP-VK.pipeline.monolithic.logic_op.r32_uint.* on AGXV (and probably PanVK). Fixes: dbd0615e7ad ("nir/lower_blend: Avoid useless iand with logic ops") Signed-off-by: Alyssa Rosenzweig Reviewed-by: Yonggang Luo Reviewed-by: Italo Nicola Part-of: --- src/compiler/nir/nir_lower_blend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_blend.c b/src/compiler/nir/nir_lower_blend.c index 70df8a918c7..d47618000b3 100644 --- a/src/compiler/nir/nir_lower_blend.c +++ b/src/compiler/nir/nir_lower_blend.c @@ -344,7 +344,7 @@ nir_blend_logicop( nir_const_value mask[4]; for (int i = 0; i < 4; ++i) - mask[i] = nir_const_value_for_int(BITFIELD_MASK(bits[i]), 32); + mask[i] = nir_const_value_for_uint(BITFIELD_MASK(bits[i]), 32); nir_ssa_def *out = nir_logicop_func(b, options->logicop_func, src, dst, nir_build_imm(b, 4, 32, mask));