mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
ac/nir: set amdgpu.uniform and invariant.load for UBOs
UBOs are constants buffers.
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Fixes: 41c36c45 ("amd/common: use ac_build_buffer_load() for emitting UBO loads")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
b453f38a47
commit
49b0a140a7
1 changed files with 7 additions and 1 deletions
|
|
@ -4568,8 +4568,14 @@ static LLVMValueRef radv_load_ssbo(struct ac_shader_abi *abi,
|
|||
static LLVMValueRef radv_load_ubo(struct ac_shader_abi *abi, LLVMValueRef buffer_ptr)
|
||||
{
|
||||
struct nir_to_llvm_context *ctx = nir_to_llvm_context_from_abi(abi);
|
||||
LLVMValueRef result;
|
||||
|
||||
return LLVMBuildLoad(ctx->builder, buffer_ptr, "");
|
||||
LLVMSetMetadata(buffer_ptr, ctx->ac.uniform_md_kind, ctx->ac.empty_md);
|
||||
|
||||
result = LLVMBuildLoad(ctx->builder, buffer_ptr, "");
|
||||
LLVMSetMetadata(result, ctx->ac.invariant_load_md_kind, ctx->ac.empty_md);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static LLVMValueRef radv_get_sampler_desc(struct ac_shader_abi *abi,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue