radeonsi: simplify the NGG culling condition in si_draw_vbo
authorMarek Olšák <marek.olsak@amd.com>
Thu, 14 Jan 2021 12:49:11 +0000 (07:49 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Feb 2021 05:42:32 +0000 (05:42 +0000)
commitffbf3a5f8b51cb2f2a98fc0eb64e5ff369e4b15c
tree60f86a0f8cb71e6490fef23dc048e6584f59784d
parent75817435108bc4a2109074fb6c1d25defe38f5e0
radeonsi: simplify the NGG culling condition in si_draw_vbo

Changes:

- disallow NGG culling for GS, fast launch for tess using template args
  (GS can't do NGG culling, tess can't do fast launch)

- skip checking current_rast_prim with tessellation
  (bake the condition into ngg_cull_vert_threshold)

- use only 1 vertex count threshold for enabling NGG shader culling
  to simplify it. I think it doesn't have a big impact. The threshold
  computation depends on more parameters than just fast launch.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state_draw.cpp
src/gallium/drivers/radeonsi/si_state_shaders.c