summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_shader_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_internal.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_internal.h104
1 files changed, 1 insertions, 103 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h
index a9b40f41b4c..1ec74a84a69 100644
--- a/src/gallium/drivers/radeonsi/si_shader_internal.h
+++ b/src/gallium/drivers/radeonsi/si_shader_internal.h
@@ -26,10 +26,6 @@
#define SI_SHADER_PRIVATE_H
#include "si_shader.h"
-#include "gallivm/lp_bld_flow.h"
-#include "gallivm/lp_bld_init.h"
-#include "gallivm/lp_bld_tgsi.h"
-#include "tgsi/tgsi_parse.h"
#include "ac_shader_abi.h"
#include <llvm-c/Core.h>
@@ -37,12 +33,7 @@
struct pipe_debug_callback;
-#define RADEON_LLVM_MAX_INPUT_SLOTS 32
#define RADEON_LLVM_MAX_INPUTS 32 * 4
-#define RADEON_LLVM_MAX_OUTPUTS 32 * 4
-
-#define RADEON_LLVM_MAX_SYSTEM_VALUES 11
-#define RADEON_LLVM_MAX_ADDRS 16
struct si_shader_output_values {
LLVMValueRef values[4];
@@ -52,8 +43,6 @@ struct si_shader_output_values {
};
struct si_shader_context {
- struct lp_build_tgsi_context bld_base;
- struct gallivm_state gallivm;
struct ac_llvm_context ac;
struct si_shader *shader;
struct si_screen *screen;
@@ -69,42 +58,11 @@ struct si_shader_context {
struct ac_shader_args args;
struct ac_shader_abi abi;
- /** This function is responsible for initilizing the inputs array and will be
- * called once for each input declared in the TGSI shader.
- */
- void (*load_input)(struct si_shader_context *,
- unsigned input_index,
- const struct tgsi_full_declaration *decl,
- LLVMValueRef out[4]);
-
- /** This array contains the input values for the shader. Typically these
- * values will be in the form of a target intrinsic that will inform the
- * backend how to load the actual inputs to the shader.
- */
- struct tgsi_full_declaration input_decls[RADEON_LLVM_MAX_INPUT_SLOTS];
LLVMValueRef inputs[RADEON_LLVM_MAX_INPUTS];
- LLVMValueRef outputs[RADEON_LLVM_MAX_OUTPUTS][TGSI_NUM_CHANNELS];
- LLVMValueRef addrs[RADEON_LLVM_MAX_ADDRS][TGSI_NUM_CHANNELS];
-
- /** This pointer is used to contain the temporary values.
- * The amount of temporary used in tgsi can't be bound to a max value and
- * thus we must allocate this array at runtime.
- */
- LLVMValueRef *temps;
- unsigned temps_count;
- LLVMValueRef system_values[RADEON_LLVM_MAX_SYSTEM_VALUES];
-
- LLVMValueRef *imms;
- unsigned imms_num;
LLVMBasicBlockRef merged_wrap_if_entry_block;
int merged_wrap_if_label;
- struct tgsi_array_info *temp_arrays;
- LLVMValueRef *temp_array_allocas;
-
- LLVMValueRef undef_alloca;
-
LLVMValueRef main_fn;
LLVMTypeRef return_type;
@@ -234,12 +192,6 @@ struct si_shader_context {
};
static inline struct si_shader_context *
-si_shader_context(struct lp_build_tgsi_context *bld_base)
-{
- return (struct si_shader_context*)bld_base;
-}
-
-static inline struct si_shader_context *
si_shader_context_from_abi(struct ac_shader_abi *abi)
{
struct si_shader_context *ctx = NULL;
@@ -255,12 +207,6 @@ unsigned si_llvm_compile(LLVMModuleRef M, struct si_shader_binary *binary,
struct pipe_debug_callback *debug,
bool less_optimized, unsigned wave_size);
-LLVMTypeRef tgsi2llvmtype(struct lp_build_tgsi_context *bld_base,
- enum tgsi_opcode_type type);
-
-LLVMValueRef bitcast(struct lp_build_tgsi_context *bld_base,
- enum tgsi_opcode_type type, LLVMValueRef value);
-
LLVMValueRef si_llvm_bound_index(struct si_shader_context *ctx,
LLVMValueRef index,
unsigned num);
@@ -271,8 +217,7 @@ void si_llvm_context_init(struct si_shader_context *ctx,
unsigned wave_size,
unsigned ballot_mask_bits);
void si_llvm_context_set_ir(struct si_shader_context *ctx,
- struct si_shader *shader,
- struct nir_shader *nir);
+ struct si_shader *shader);
void si_llvm_create_func(struct si_shader_context *ctx,
const char *name,
@@ -282,18 +227,6 @@ void si_llvm_dispose(struct si_shader_context *ctx);
void si_llvm_optimize_module(struct si_shader_context *ctx);
-LLVMValueRef si_llvm_emit_fetch_64bit(struct lp_build_tgsi_context *bld_base,
- LLVMTypeRef type,
- LLVMValueRef ptr,
- LLVMValueRef ptr2);
-
-LLVMValueRef si_llvm_emit_fetch(struct lp_build_tgsi_context *bld_base,
- const struct tgsi_full_src_register *reg,
- enum tgsi_opcode_type type,
- unsigned swizzle);
-
-void si_llvm_emit_kill(struct ac_shader_abi *abi, LLVMValueRef visible);
-
LLVMValueRef si_nir_load_input_tes(struct ac_shader_abi *abi,
LLVMTypeRef type,
LLVMValueRef vertex_index,
@@ -306,34 +239,10 @@ LLVMValueRef si_nir_load_input_tes(struct ac_shader_abi *abi,
bool is_patch,
bool is_compact,
bool load_input);
-
-LLVMValueRef si_llvm_load_input_gs(struct ac_shader_abi *abi,
- unsigned input_index,
- unsigned vtx_offset_param,
- LLVMTypeRef type,
- unsigned swizzle);
-
LLVMValueRef si_nir_lookup_interp_param(struct ac_shader_abi *abi,
enum glsl_interp_mode interp,
unsigned location);
-
-void si_llvm_emit_store(struct lp_build_tgsi_context *bld_base,
- const struct tgsi_full_instruction *inst,
- const struct tgsi_opcode_info *info,
- unsigned index,
- LLVMValueRef dst[4]);
-
-LLVMValueRef si_get_indirect_index(struct si_shader_context *ctx,
- const struct tgsi_ind_register *ind,
- unsigned addr_mul, int rel_index);
-LLVMValueRef si_get_bounded_indirect_index(struct si_shader_context *ctx,
- const struct tgsi_ind_register *ind,
- int rel_index, unsigned num);
LLVMValueRef si_get_sample_id(struct si_shader_context *ctx);
-
-void si_shader_context_init_alu(struct si_shader_context *ctx);
-void si_shader_context_init_mem(struct si_shader_context *ctx);
-
LLVMValueRef si_load_sampler_desc(struct si_shader_context *ctx,
LLVMValueRef list, LLVMValueRef index,
enum ac_descriptor_type type);
@@ -342,14 +251,7 @@ LLVMValueRef si_load_image_desc(struct si_shader_context *ctx,
enum ac_descriptor_type desc_type,
bool uses_store, bool bindless);
LLVMValueRef si_nir_emit_fbfetch(struct ac_shader_abi *abi);
-
-void si_load_system_value(struct si_shader_context *ctx,
- unsigned index,
- const struct tgsi_full_declaration *decl);
void si_declare_compute_memory(struct si_shader_context *ctx);
-void si_tgsi_declare_compute_memory(struct si_shader_context *ctx,
- const struct tgsi_full_declaration *decl);
-
LLVMValueRef si_get_primitive_id(struct si_shader_context *ctx,
unsigned swizzle);
void si_llvm_export_vs(struct si_shader_context *ctx,
@@ -365,10 +267,6 @@ void si_llvm_load_input_vs(
struct si_shader_context *ctx,
unsigned input_index,
LLVMValueRef out[4]);
-void si_llvm_load_input_fs(
- struct si_shader_context *ctx,
- unsigned input_index,
- LLVMValueRef out[4]);
bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir);