From e28233a5270f8d862251835b340ea7634547ff36 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 24 Jan 2018 23:26:21 +0100 Subject: [PATCH] ac/nir: set amdgpu.uniform and invariant.load for SSBOs For descriptors. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 7425f0af20c..35f3c587228 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4561,8 +4561,14 @@ static LLVMValueRef radv_load_ssbo(struct ac_shader_abi *abi, LLVMValueRef buffer_ptr, bool write) { struct nir_to_llvm_context *ctx = nir_to_llvm_context_from_abi(abi); + LLVMValueRef result; + + LLVMSetMetadata(buffer_ptr, ctx->ac.uniform_md_kind, ctx->ac.empty_md); - return LLVMBuildLoad(ctx->builder, buffer_ptr, ""); + result = LLVMBuildLoad(ctx->builder, buffer_ptr, ""); + LLVMSetMetadata(result, ctx->ac.invariant_load_md_kind, ctx->ac.empty_md); + + return result; } static LLVMValueRef radv_load_ubo(struct ac_shader_abi *abi, LLVMValueRef buffer_ptr) -- 2.30.2