summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_llvm.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-08-10 18:41:21 +0200
committerNicolai Hähnle <[email protected]>2016-08-17 12:11:23 +0200
commit7c2295d7efba2178c22e0caf9d9166db81ea7329 (patch)
tree1885cc98283fd02eb9ea5d0b21f5362a8ee3dd52 /src/gallium/drivers/radeon/radeon_llvm.h
parent850c8dcc9c4ab36bb9bbd8607f0f5caa9b7d968a (diff)
gallium/radeon: allocate temps array info in radeon_llvm_context_init
Also, prepare for using tgsi_array_info. This also opens the door for properly handling allocation failures, but I'm leaving that for a separate change. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_llvm.h')
-rw-r--r--src/gallium/drivers/radeon/radeon_llvm.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeon/radeon_llvm.h b/src/gallium/drivers/radeon/radeon_llvm.h
index 13f33363147..6086dd6864a 100644
--- a/src/gallium/drivers/radeon/radeon_llvm.h
+++ b/src/gallium/drivers/radeon/radeon_llvm.h
@@ -50,11 +50,6 @@ struct radeon_llvm_loop {
LLVMBasicBlockRef endloop_block;
};
-struct radeon_llvm_array {
- struct tgsi_declaration_range range;
- LLVMValueRef alloca;
-};
-
struct radeon_llvm_context {
struct lp_build_tgsi_soa_context soa;
@@ -101,7 +96,8 @@ struct radeon_llvm_context {
unsigned loop_depth;
unsigned loop_depth_max;
- struct radeon_llvm_array *arrays;
+ struct tgsi_array_info *temp_arrays;
+ LLVMValueRef *temp_array_allocas;
LLVMValueRef main_fn;
LLVMTypeRef return_type;
@@ -124,7 +120,8 @@ void radeon_llvm_emit_prepare_cube_coords(struct lp_build_tgsi_context *bld_base
LLVMValueRef *derivs_arg);
void radeon_llvm_context_init(struct radeon_llvm_context *ctx,
- const char *triple);
+ const char *triple,
+ const struct tgsi_shader_info *info);
void radeon_llvm_create_func(struct radeon_llvm_context *ctx,
LLVMTypeRef *return_types, unsigned num_return_elems,