Skip to content

ac/nir/ngg: Don't store primitive IDs from culled primitives.

Timur Kristóf requested to merge Venemo/mesa:ac_nir_nggc_prim_id_fix into main

Primitive export used the gs_accepted variable after culling, so we overwrote this variable after vertex compaction to make sure not to hang the GPU.

This had an unintended side effect when storing the primitive ID to LDS on GS threads: the LDS store was done even on threads whose triangle was culled; potentially causing issues.

As a fix, create a separate boolean variable that remembers which invocations need to export a primitive; and don't store the primitive ID to LDS when gs_accepted is false.

Merge request reports