mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
radeonsi: replace tess_levels_written_for_tes mask with a count
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
This commit is contained in:
parent
9d9cfd89da
commit
be44da1888
3 changed files with 6 additions and 5 deletions
|
|
@ -194,8 +194,9 @@ static void scan_io_usage(const nir_shader *nir, struct si_shader_info *info,
|
|||
if (slot_semantic == VARYING_SLOT_TESS_LEVEL_INNER ||
|
||||
slot_semantic == VARYING_SLOT_TESS_LEVEL_OUTER) {
|
||||
if (!nir_intrinsic_io_semantics(intr).no_varying) {
|
||||
info->tess_levels_written_for_tes |=
|
||||
BITFIELD_BIT(ac_shader_io_get_unique_index_patch(slot_semantic));
|
||||
unsigned index = ac_shader_io_get_unique_index_patch(slot_semantic);
|
||||
info->num_tess_level_vram_outputs =
|
||||
MAX2(info->num_tess_level_vram_outputs, index + 1);
|
||||
}
|
||||
} else if ((slot_semantic <= VARYING_SLOT_VAR31 ||
|
||||
slot_semantic >= VARYING_SLOT_VAR0_16BIT) &&
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ struct si_shader_info {
|
|||
/* For VS before {TCS, TES, GS} and TES before GS. */
|
||||
uint64_t ls_es_outputs_written; /* "get_unique_index" bits */
|
||||
uint64_t outputs_written_before_ps; /* "get_unique_index" bits */
|
||||
uint32_t tess_levels_written_for_tes; /* "get_unique_index_patch" bits */
|
||||
uint8_t num_tess_level_vram_outputs; /* max "get_unique_index_patch" + 1*/
|
||||
|
||||
uint8_t clipdist_mask;
|
||||
uint8_t culldist_mask;
|
||||
|
|
|
|||
|
|
@ -4810,8 +4810,8 @@ void si_update_tess_io_layout_state(struct si_context *sctx)
|
|||
unsigned num_tcs_output_cp = tcs->info.base.tess.tcs_vertices_out;
|
||||
unsigned lds_input_vertex_size = si_shader_lshs_vertex_stride(ls_current);
|
||||
unsigned num_remapped_tess_level_outputs =
|
||||
util_last_bit(!ls_current->is_monolithic || ls_current->key.ge.opt.tes_reads_tess_factors ?
|
||||
tcs->info.tess_levels_written_for_tes : 0);
|
||||
!ls_current->is_monolithic || ls_current->key.ge.opt.tes_reads_tess_factors ?
|
||||
tcs->info.num_tess_level_vram_outputs : 0;
|
||||
unsigned num_patches, lds_size;
|
||||
|
||||
/* Compute NUM_PATCHES and LDS_SIZE. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue