diff options
author | Nicolai Hähnle <[email protected]> | 2017-11-16 16:49:06 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-03 15:51:12 -0400 |
commit | 5059a4df8aa855aa62ebcb6eb2ee66357407ca04 (patch) | |
tree | 2b96ad56887c0e944588bd5e121218c4937db564 | |
parent | 4a774ba893b460ab375d60a7479e5b6affdf32f4 (diff) |
radeonsi: make si_llvm_export_vs externally available
Acked-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_internal.h | 11 |
2 files changed, 17 insertions, 12 deletions
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, |