From 26595577b3bbd9832bc01af26f880f5887b8bbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 14 Aug 2025 17:13:12 +0200 Subject: [PATCH] aco/isel: allow for large 8-bit vectors in extract_8_16_bit_sgpr_element() Part-of: --- .../compiler/instruction_selection/aco_select_nir_alu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp b/src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp index a6c6d39e8ac..c4c5d452a2e 100644 --- a/src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp +++ b/src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp @@ -37,9 +37,9 @@ extract_8_16_bit_sgpr_element(isel_context* ctx, Temp dst, nir_alu_src* src, sgp unsigned swizzle = src->swizzle[0]; if (vec.size() > 1) { - assert(src_size == 16); - vec = emit_extract_vector(ctx, vec, swizzle / 2, s1); - swizzle = swizzle & 1; + unsigned factor = 32 / src_size; + vec = emit_extract_vector(ctx, vec, swizzle / factor, s1); + swizzle = swizzle & (factor - 1); } Builder bld(ctx->program, ctx->block);