summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-05-20 17:19:50 +0200
committerNicolai Hähnle <[email protected]>2017-07-31 14:55:36 +0200
commitd007919d999c812bbef481f0605c64f7e0f225b7 (patch)
tree710af1d089144ca32bf05feb43b164c1201cf11d /src/amd
parent220ed150bcaa7b2ecfc169a0016b68933d3be8d4 (diff)
ac/nir,radeonsi: add ac_shader_abi::load_ubo
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c3
-rw-r--r--src/amd/common/ac_shader_abi.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index b3c18d391b1..e6befff861c 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2454,6 +2454,9 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
LLVMValueRef offset = get_src(ctx, instr->src[1]);
int num_components = instr->num_components;
+ if (ctx->abi->load_ubo)
+ rsrc = ctx->abi->load_ubo(ctx->abi, rsrc);
+
if (instr->dest.ssa.bit_size == 64)
num_components *= 2;
diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h
index 81fbc22bb4d..b0161d9f220 100644
--- a/src/amd/common/ac_shader_abi.h
+++ b/src/amd/common/ac_shader_abi.h
@@ -46,6 +46,8 @@ struct ac_shader_abi {
void (*emit_outputs)(struct ac_shader_abi *abi,
unsigned max_outputs,
LLVMValueRef *addrs);
+
+ LLVMValueRef (*load_ubo)(struct ac_shader_abi *abi, LLVMValueRef index);
};
#endif /* AC_SHADER_ABI_H */