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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user