ac/llvm: fix readlane with vectors

It crashes in LLVM when the type is not scalar integer.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
This commit is contained in:
Marek Olšák
2025-03-18 16:52:02 -04:00
committed by Marge Bot
parent 543fddb01b
commit 4a80272bae
+1 -1
View File
@@ -2569,7 +2569,7 @@ static LLVMValueRef ac_build_readlane_common(struct ac_llvm_context *ctx, LLVMVa
{
LLVMTypeRef src_type = LLVMTypeOf(src);
src = ac_to_integer(ctx, src);
unsigned bits = LLVMGetIntTypeWidth(LLVMTypeOf(src));
unsigned bits = ac_get_type_size(LLVMTypeOf(src)) * 8;
LLVMValueRef ret;
if (bits > 32) {