radeonsi: make si_llvm_export_vs externally available

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Nicolai Hähnle
2017-11-16 16:49:06 +01:00
committed by Marek Olšák
parent 4a774ba893
commit 5059a4df8a
2 changed files with 17 additions and 12 deletions

View File

@@ -47,14 +47,6 @@ static const char scratch_rsrc_dword0_symbol[] =
static const char scratch_rsrc_dword1_symbol[] = static const char scratch_rsrc_dword1_symbol[] =
"SCRATCH_RSRC_DWORD1"; "SCRATCH_RSRC_DWORD1";
struct si_shader_output_values
{
LLVMValueRef values[4];
unsigned semantic_name;
unsigned semantic_index;
ubyte vertex_stream[4];
};
static void si_init_shader_ctx(struct si_shader_context *ctx, static void si_init_shader_ctx(struct si_shader_context *ctx,
struct si_screen *sscreen, struct si_screen *sscreen,
struct ac_llvm_compiler *compiler); struct ac_llvm_compiler *compiler);
@@ -2870,10 +2862,12 @@ static void si_vertex_color_clamping(struct si_shader_context *ctx,
} }
} }
/* Generate export instructions for hardware VS shader stage */ /* Generate export instructions for hardware VS shader stage or NGG GS stage
static void si_llvm_export_vs(struct si_shader_context *ctx, * (position and parameter data only).
struct si_shader_output_values *outputs, */
unsigned noutput) void si_llvm_export_vs(struct si_shader_context *ctx,
struct si_shader_output_values *outputs,
unsigned noutput)
{ {
struct si_shader *shader = ctx->shader; struct si_shader *shader = ctx->shader;
struct ac_export_args pos_args[4] = {}; struct ac_export_args pos_args[4] = {};

View File

@@ -60,6 +60,13 @@ struct si_function_info {
unsigned num_params; unsigned num_params;
}; };
struct si_shader_output_values {
LLVMValueRef values[4];
unsigned semantic_name;
unsigned semantic_index;
ubyte vertex_stream[4];
};
struct si_shader_context { struct si_shader_context {
struct lp_build_tgsi_context bld_base; struct lp_build_tgsi_context bld_base;
struct gallivm_state gallivm; struct gallivm_state gallivm;
@@ -339,6 +346,10 @@ void si_declare_compute_memory(struct si_shader_context *ctx);
void si_tgsi_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); const struct tgsi_full_declaration *decl);
void si_llvm_export_vs(struct si_shader_context *ctx,
struct si_shader_output_values *outputs,
unsigned noutput);
void si_llvm_load_input_vs( void si_llvm_load_input_vs(
struct si_shader_context *ctx, struct si_shader_context *ctx,
unsigned input_index, unsigned input_index,