From: Nicolai Hähnle Date: Thu, 16 Nov 2017 15:49:06 +0000 (+0100) Subject: radeonsi: make si_llvm_export_vs externally available X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5059a4df8aa855aa62ebcb6eb2ee66357407ca04;p=mesa.git radeonsi: make si_llvm_export_vs externally available Acked-by: Bas Nieuwenhuizen --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 0489399b827..1189f776deb 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -47,14 +47,6 @@ static const char scratch_rsrc_dword0_symbol[] = static const char scratch_rsrc_dword1_symbol[] = "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, struct si_screen *sscreen, 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 */ -static void si_llvm_export_vs(struct si_shader_context *ctx, - struct si_shader_output_values *outputs, - unsigned noutput) +/* Generate export instructions for hardware VS shader stage or NGG GS stage + * (position and parameter data only). + */ +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 ac_export_args pos_args[4] = {}; diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 4a7b059de9a..e7689520968 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -60,6 +60,13 @@ struct si_function_info { 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 lp_build_tgsi_context bld_base; 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, 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( struct si_shader_context *ctx, unsigned input_index,