amd/common: Introduce ac_get_fs_input_vgpr_cnt.

Add a function called ac_get_fs_input_vgpr_cnt which will return
the number of input VGPRs used by an AMD shader. Previously,
radv and radeonsi had the same code duplicated, but this commit also
allows them to share this code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timur Kristóf
2019-09-25 16:40:07 +02:00
committed by Connor Abbott
parent 83eebdb507
commit a4fd8ba7e3
4 changed files with 63 additions and 73 deletions

View File

@@ -28,6 +28,7 @@
#include <stdint.h>
#include "amd_family.h"
#include "ac_binary.h"
#include "compiler/nir/nir.h"
enum ac_image_dim {
@@ -63,4 +64,9 @@ enum ac_image_dim
ac_get_image_dim(enum chip_class chip_class, enum glsl_sampler_dim sdim,
bool is_array);
unsigned
ac_get_fs_input_vgpr_cnt(const struct ac_shader_config *config,
signed char *face_vgpr_index,
signed char *ancillary_vgpr_index);
#endif