Module: Mesa Branch: main Commit: 5d8f0c570e5dfcd6c0c5e634c690f684e106471a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d8f0c570e5dfcd6c0c5e634c690f684e106471a
Author: Marek Olšák <[email protected]> Date: Fri Mar 24 20:46:39 2023 -0400 amd/llvm: remove no-op code for vec3 loads in ac_build_tbuffer_load Formatted loads always support vec3, so this code didn't do anything. Reviewed-by: Konstantin Seurer <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22117> --- src/amd/llvm/ac_llvm_build.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index 7c7b7f4066c..d1a02b841e8 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -1454,12 +1454,10 @@ static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValue args[idx++] = soffset ? soffset : ctx->i32_0; args[idx++] = LLVMConstInt(ctx->i32, tbuffer_format, 0); args[idx++] = LLVMConstInt(ctx->i32, get_load_cache_policy(ctx, cache_policy), 0); - unsigned func = - !ac_has_vec3_support(ctx->gfx_level, true) && num_channels == 3 ? 4 : num_channels; const char *indexing_kind = vindex ? "struct" : "raw"; char name[256], type_name[8]; - LLVMTypeRef type = func > 1 ? LLVMVectorType(channel_type, func) : channel_type; + LLVMTypeRef type = num_channels > 1 ? LLVMVectorType(channel_type, num_channels) : channel_type; ac_build_type_name_for_intr(type, type_name, sizeof(type_name)); snprintf(name, sizeof(name), "llvm.amdgcn.%s.tbuffer.load.%s", indexing_kind, type_name);
