mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 02:50:16 +01:00
Instead of storing the vertex mask per wave into LDS and then computing the prefix sum, store 8-bit bitcounts (vertex counts) of the vertex masks into LDS. This allows us to compute the sum using v_sad_u8, which computes a sum of 4 i8vec4 components in one instruction. Each i8vec4 of vertex counts is loaded in parallel threads (one dword per thread) instead of all being loaded in thread 0, and readlane copies them to SGPRs instead of readfirstlane. LDS is no longer initialized before culling. Instead, the counts for inactive waves are masked with AND later. Incorrect old comments are also fixed. This change removes 80 bytes from the code size, and it allows increasing the workgroup size from 128 to 256. (which is the main motivation for this) Now changing the workgroup size with wave64 has no effect on the code size. Switching to wave32 with 8 waves even generates slightly smaller code than wave64 with 4 waves. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813> |
||
|---|---|---|
| .. | ||
| addrlib | ||
| ci | ||
| common | ||
| compiler | ||
| llvm | ||
| registers | ||
| vulkan | ||
| .clang-format | ||
| Android.addrlib.mk | ||
| Android.common.mk | ||
| Android.compiler.mk | ||
| Android.mk | ||
| Makefile.sources | ||
| meson.build | ||