Skip to content

ac/nir/ngg: Include culled primitives in query.

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

Include culled primitives in query, and make sure the code is executed even when all primitives are culled.

Vulkan spec 18.8. Primitives Generated Queries:

When a generated primitive query for a vertex stream is active, the primitives-generated count is incremented every time a primitive emitted to that stream reaches the transform feedback stage, whether or not transform feedback is active.

We can see the order of stages in chapter 27 Fixed-Function Vertex Post-Processing, which shows that the transform feedback stage is before rasterization (and therefore culling).

Conclusion is that culled primitives should be included in the primitives generated query.

Merge request reports