e97f0463a8
Culling is traditionally done by the rasterizer, but that can be a bottleneck when an app creates a large number of primitives. Eg. a lot of tiny triangles reduce the rasterziation efficiency. NGG makes it possible for the shader to check primitives and delete those that it can prove are not needed. After this is done, we have to repack the surviving invocations so they remain compact. This also saves bandwidth, because some memory loads are only executed by those vertices that survived the culling. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10525>