radv: Refactor calculate_tess_lds_size and get_tcs_num_patches.
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 30 Mar 2020 14:04:53 +0000 (16:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 11:51:04 +0000 (11:51 +0000)
commitfd0248c37bfaa0dabbab11fc3060ebe52443eb05
treee6e478b08f22cda83eca20db6a9bc9ab92613a92
parent9392ddab4399d796fdf37602f586965ec17f2b2a
radv: Refactor calculate_tess_lds_size and get_tcs_num_patches.

Previously these functions needed the bit mask of the TCS outputs
and patch outputs written, and concluded the number of outputs
from that.

Now, they take the number of outputs and patch outputs instead.
This will allow the backend compiler to better optimize the
LDS layout.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4388>
src/amd/compiler/aco_instruction_selection_setup.cpp
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_shader.h