radv: implement dynamic primitive restart enable
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/10340>
This commit is contained in:

committed by
Marge Bot

parent
f2933e9872
commit
c40d7fadc3
@@ -792,7 +792,7 @@ static const struct radv_prim_vertex_count prim_size_table[] = {
|
||||
uint32_t
|
||||
si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, bool instanced_draw,
|
||||
bool indirect_draw, bool count_from_stream_output,
|
||||
uint32_t draw_vertex_count, unsigned topology)
|
||||
uint32_t draw_vertex_count, unsigned topology, bool prim_restart_enable)
|
||||
{
|
||||
enum chip_class chip_class = cmd_buffer->device->physical_device->rad_info.chip_class;
|
||||
enum radeon_family family = cmd_buffer->device->physical_device->rad_info.family;
|
||||
@@ -831,7 +831,7 @@ si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, bool instanced_dra
|
||||
if (cmd_buffer->device->physical_device->rad_info.max_se < 4 ||
|
||||
topology == V_008958_DI_PT_POLYGON || topology == V_008958_DI_PT_LINELOOP ||
|
||||
topology == V_008958_DI_PT_TRIFAN || topology == V_008958_DI_PT_TRISTRIP_ADJ ||
|
||||
(cmd_buffer->state.pipeline->graphics.prim_restart_enable &&
|
||||
(prim_restart_enable &&
|
||||
(cmd_buffer->device->physical_device->rad_info.family < CHIP_POLARIS10 ||
|
||||
(topology != V_008958_DI_PT_POINTLIST && topology != V_008958_DI_PT_LINESTRIP))))
|
||||
wd_switch_on_eop = true;
|
||||
@@ -899,7 +899,7 @@ si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, bool instanced_dra
|
||||
/* Workaround for a VGT hang when strip primitive types are used with
|
||||
* primitive restart.
|
||||
*/
|
||||
if (cmd_buffer->state.pipeline->graphics.prim_restart_enable &&
|
||||
if (prim_restart_enable &&
|
||||
(topology == V_008958_DI_PT_LINESTRIP || topology == V_008958_DI_PT_TRISTRIP ||
|
||||
topology == V_008958_DI_PT_LINESTRIP_ADJ || topology == V_008958_DI_PT_TRISTRIP_ADJ)) {
|
||||
partial_vs_wave = true;
|
||||
|
Reference in New Issue
Block a user