summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_pipe.h
diff options
context:
space:
mode:
authorQiang Yu <yuq825@gmail.com>2022-05-20 17:27:27 +0800
committerMarge Bot <emma+marge@anholt.net>2022-06-27 02:38:21 +0000
commita1763ad4b362c9f3a1fd12b6d06009b17fac3d24 (patch)
tree84774d13ad818ec436938e1e7134dd0f10e1db85 /src/gallium/drivers/radeonsi/si_pipe.h
parent3ab9c42b43d907696d2e18c5020a5abcaae47096 (diff)
radeonsi: replace llvm based fixed tcs with nir
Create nir passthrough shader with explicit input/output and vertex output count so that it can be handled by compiler same as user tcs. The drawback is we create more si_shader_selector with different input/output and vertex output count which was handled by compiler backend before. As fixed function tcs can be handled like user tcs, we don't need the dedicated fixed_func_tcs_shader state either. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16705>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 80ec9ae4a79..80e03678366 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -999,7 +999,7 @@ struct si_context {
struct si_screen *screen;
struct util_debug_callback debug;
struct ac_llvm_compiler compiler; /* only non-threaded compilation */
- struct si_shader_ctx_state fixed_func_tcs_shader;
+ struct hash_table *fixed_func_tcs_shader_cache;
struct si_resource *wait_mem_scratch;
struct si_resource *wait_mem_scratch_tmz;
unsigned wait_mem_number;
@@ -1076,6 +1076,8 @@ struct si_context {
struct si_shader_ctx_state shaders[SI_NUM_GRAPHICS_SHADERS];
};
struct si_cs_shader_state cs_shader_state;
+ /* if current tcs set by user */
+ bool is_user_tcs;
/* shader information */
uint64_t ps_inputs_read_or_disabled;
@@ -1557,7 +1559,6 @@ void *si_create_passthrough_tcs(struct si_context *sctx);
/* si_shaderlib_tgsi.c */
void *si_get_blitter_vs(struct si_context *sctx, enum blitter_attrib_type type,
unsigned num_layers);
-void *si_create_fixed_func_tcs(struct si_context *sctx);
void *si_create_dma_compute_shader(struct pipe_context *ctx, unsigned num_dwords_per_thread,
bool dst_stream_cache_policy, bool is_copy);
void *si_create_clear_buffer_rmw_cs(struct si_context *sctx);