radv: Rename LDS related variables in get_tcs_num_patches.
No functional changes, just improves code clarity.
Fixes: 0e481a4adc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user