From 8190a65c780e2fe2d28afc534305705ab876ea04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Mon, 15 Apr 2024 12:19:09 +0200 Subject: [PATCH] radv: Rename LDS related variables in get_tcs_num_patches. No functional changes, just improves code clarity. Fixes: 0e481a4adcd8006256c27d100a0a0f0c01a94171 Part-of: --- src/amd/vulkan/radv_shader.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 65028b1389a..d3db1a635ea 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -672,14 +672,14 @@ calculate_tess_lds_size(enum amd_gfx_level gfx_level, unsigned tcs_num_input_ver static inline unsigned get_tcs_num_patches(unsigned tcs_num_input_vertices, unsigned tcs_num_output_vertices, unsigned tcs_num_inputs, - unsigned tcs_num_outputs, unsigned tcs_num_patch_outputs, unsigned tess_offchip_block_dw_size, - enum amd_gfx_level gfx_level, enum radeon_family family) + unsigned tcs_num_lds_outputs, unsigned tcs_num_lds_patch_outputs, + unsigned tess_offchip_block_dw_size, enum amd_gfx_level gfx_level, enum radeon_family family) { uint32_t input_vertex_size = get_tcs_input_vertex_stride(tcs_num_inputs); uint32_t input_patch_size = tcs_num_input_vertices * input_vertex_size; - uint32_t output_vertex_size = tcs_num_outputs * 16; - uint32_t pervertex_output_patch_size = tcs_num_output_vertices * output_vertex_size; - uint32_t output_patch_size = pervertex_output_patch_size + tcs_num_patch_outputs * 16; + uint32_t lds_output_vertex_size = tcs_num_lds_outputs * 16; + uint32_t lds_pervertex_output_patch_size = tcs_num_output_vertices * lds_output_vertex_size; + uint32_t lds_output_patch_size = lds_pervertex_output_patch_size + tcs_num_lds_patch_outputs * 16; /* Ensure that we only need one wave per SIMD so we don't need to check * resource usage. Also ensures that the number of tcs in and out @@ -699,11 +699,11 @@ get_tcs_num_patches(unsigned tcs_num_input_vertices, unsigned tcs_num_output_ver if (gfx_level >= GFX7 && family != CHIP_STONEY) hardware_lds_size = 65536; - if (input_patch_size + output_patch_size) - num_patches = MIN2(num_patches, hardware_lds_size / (input_patch_size + output_patch_size)); + if (input_patch_size + lds_output_patch_size) + num_patches = MIN2(num_patches, hardware_lds_size / (input_patch_size + lds_output_patch_size)); /* Make sure the output data fits in the offchip buffer */ - if (output_patch_size) - num_patches = MIN2(num_patches, (tess_offchip_block_dw_size * 4) / output_patch_size); + if (lds_output_patch_size) + num_patches = MIN2(num_patches, (tess_offchip_block_dw_size * 4) / lds_output_patch_size); /* Not necessary for correctness, but improves performance. The * specific value is taken from the proprietary driver. */