Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for SW primitive statistics counting
For pre-GFX11, the primitive statistics counting is performed by HW via the same mechanism of transform feedback. For GFX11+, since transform feedback is done by SW emulation, the primitive statistics counting will follow the same handling. We add a new handler collectPrimitiveStats to deal with it. It is a reduced version of SW transform feedback, only updating HW counters of requested vertex streams. We don't merge it with SW transform feedback because this will make the logic blurry. Indeed, some duplicated codes are the trade-off. For non-GS case, only the counter of stream 0 will be updated and generated primitive count is passed by GE (we don't modify it). For GS case, counters of all active vertex streams will be updated and we must calculate generated primitive count first before doing such update. The calculation is to count valid primitive mask bits in this NGG subgroup and add them together. The implementation of this PR is the foundation of VK_EXT_primitives_generated_query.
- Loading branch information