mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
radv: fix applying the NGG minimum vertex count requirement
Ported from RadeonSI. The restriction was applied too late. Cc: 20.2 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7566>
This commit is contained in:
parent
0790105f2f
commit
c5e8f6700b
1 changed files with 8 additions and 3 deletions
|
|
@ -2073,6 +2073,8 @@ gfx10_get_ngg_info(const struct radv_pipeline_key *key,
|
|||
(max_lds_size - max_gsprims * gsprim_lds_size) /
|
||||
esvert_lds_size);
|
||||
max_esverts = MIN2(max_esverts, max_gsprims * max_verts_per_prim);
|
||||
/* Hardware restriction: minimum value of max_esverts */
|
||||
max_esverts = MAX2(max_esverts, min_esverts - 1 + max_verts_per_prim);
|
||||
|
||||
max_gsprims = align(max_gsprims, wavesize);
|
||||
max_gsprims = MIN2(max_gsprims, max_gsprims_base);
|
||||
|
|
@ -2084,10 +2086,13 @@ gfx10_get_ngg_info(const struct radv_pipeline_key *key,
|
|||
min_verts_per_prim, uses_adjacency);
|
||||
assert(max_esverts >= max_verts_per_prim && max_gsprims >= 1);
|
||||
} while (orig_max_esverts != max_esverts || orig_max_gsprims != max_gsprims);
|
||||
}
|
||||
|
||||
/* Hardware restriction: minimum value of max_esverts */
|
||||
max_esverts = MAX2(max_esverts, min_esverts - 1 + max_verts_per_prim);
|
||||
/* Verify the restriction. */
|
||||
assert(max_esverts >= min_esverts - 1 + max_verts_per_prim);
|
||||
} else {
|
||||
/* Hardware restriction: minimum value of max_esverts */
|
||||
max_esverts = MAX2(max_esverts, min_esverts - 1 + max_verts_per_prim);
|
||||
}
|
||||
|
||||
unsigned max_out_vertices =
|
||||
max_vert_out_per_gs_instance ? gs_info->gs.vertices_out :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue