radv: Add TES num_linked_patch_inputs.
Not needed by actual driver functionality, but will be used for reporting I/O stats. 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/29209>
This commit is contained in:
@@ -1397,6 +1397,7 @@ radv_link_tcs(const struct radv_device *device, struct radv_shader_stage *tcs_st
|
||||
tcs_stage->info.outputs_linked = true;
|
||||
|
||||
tes_stage->info.tes.num_linked_inputs = num_reserved_outputs;
|
||||
tes_stage->info.tes.num_linked_patch_inputs = num_reserved_patch_outputs;
|
||||
tes_stage->info.inputs_linked = true;
|
||||
}
|
||||
|
||||
|
@@ -587,9 +587,12 @@ gather_shader_info_tes(struct radv_device *device, const nir_shader *nir, struct
|
||||
info->tes.reads_tess_factors =
|
||||
!!(nir->info.inputs_read & (VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER));
|
||||
|
||||
if (!info->inputs_linked)
|
||||
if (!info->inputs_linked) {
|
||||
info->tes.num_linked_inputs = util_last_bit64(radv_gather_unlinked_io_mask(
|
||||
nir->info.inputs_read & ~(VARYING_BIT_TESS_LEVEL_OUTER | VARYING_BIT_TESS_LEVEL_INNER)));
|
||||
info->tes.num_linked_patch_inputs = util_last_bit64(
|
||||
radv_gather_unlinked_patch_io_mask(nir->info.inputs_read, nir->info.patch_inputs_read));
|
||||
}
|
||||
if (!info->outputs_linked)
|
||||
info->tes.num_linked_outputs = util_last_bit64(radv_gather_unlinked_io_mask(nir->info.outputs_written));
|
||||
|
||||
|
@@ -152,6 +152,7 @@ struct radv_shader_info {
|
||||
bool reads_tess_factors;
|
||||
unsigned tcs_vertices_out;
|
||||
uint8_t num_linked_inputs; /* Number of reserved per-vertex input slots in VRAM. */
|
||||
uint8_t num_linked_patch_inputs; /* Number of reserved per-patch input slots in VRAM. */
|
||||
uint8_t num_linked_outputs;
|
||||
uint32_t num_outputs; /* For NGG streamout only */
|
||||
} tes;
|
||||
|
Reference in New Issue
Block a user