Module: Mesa Branch: master Commit: f7364c9fe0ad2e8bae94045b4ffef13a12f49faa URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7364c9fe0ad2e8bae94045b4ffef13a12f49faa
Author: Marek Olšák <[email protected]> Date: Sat Nov 14 17:45:31 2020 -0500 radeonsi: don't allocate LDS for TCS inputs if it's not used Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623> --- src/gallium/drivers/radeonsi/si_state_draw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 8a72921b87a..74cfd6ac4d6 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -131,7 +131,12 @@ static void si_emit_derived_tess_state(struct si_context *sctx, const struct pip input_vertex_size = ls->lshs_vertex_stride; output_vertex_size = num_tcs_outputs * 16; - input_patch_size = num_tcs_input_cp * input_vertex_size; + /* Allocate LDS for TCS inputs only if it's used. */ + if (!ls_current->key.opt.same_patch_vertices || + tcs->info.base.inputs_read & ~tcs->tcs_vgpr_only_inputs) + input_patch_size = num_tcs_input_cp * input_vertex_size; + else + input_patch_size = 0; pervertex_output_patch_size = num_tcs_output_cp * output_vertex_size; output_patch_size = pervertex_output_patch_size + num_tcs_patch_outputs * 16; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
