|
HDK
|
#include <GR_UtilsVK.h>
Public Member Functions | |
| RadixSortGPU (uint num_instance) | |
| void | setupRadixSortGPUIndirect (RV_Render *rv, UT_UniquePtr< RV_ShaderBlock > &draw_indirect_params, RV_VKBuffer *keys_buffer, RV_VKBuffer *indices_buffer) |
| void | setupRadixSortGPU (RV_Render *rv, RV_VKBuffer *keys_buffer, RV_VKBuffer *indices_buffer) |
| void | radixSortGPU (RV_Render *rv, RV_VKBuffer *keys_buffer, RV_VKBuffer *indices_buffer) |
Static Public Member Functions | |
| static bool | initShaders (RV_Instance *inst) |
| static void | cleanupShaders () |
The RadixSortGPU requires calling a setup function once during initialization, after which the sort can be invoked as needed.
Definition at line 272 of file GR_UtilsVK.h.
|
inline |
Definition at line 275 of file GR_UtilsVK.h.
|
static |
|
static |
| void GR_Utils::RadixSortGPU::radixSortGPU | ( | RV_Render * | rv, |
| RV_VKBuffer * | keys_buffer, | ||
| RV_VKBuffer * | indices_buffer | ||
| ) |
| void GR_Utils::RadixSortGPU::setupRadixSortGPU | ( | RV_Render * | rv, |
| RV_VKBuffer * | keys_buffer, | ||
| RV_VKBuffer * | indices_buffer | ||
| ) |
Direct radix sort: Use when the number of elements to sort is known on the CPU. Creates a draw indirect buffer internally with the element count, then uses the same shader pipeline as the indirect version. No indirect buffer needed but requires CPU knowledge of the sort size.
| void GR_Utils::RadixSortGPU::setupRadixSortGPUIndirect | ( | RV_Render * | rv, |
| UT_UniquePtr< RV_ShaderBlock > & | draw_indirect_params, | ||
| RV_VKBuffer * | keys_buffer, | ||
| RV_VKBuffer * | indices_buffer | ||
| ) |
Indirect radix sort: Use when the number of elements to sort is determined dynamically on the GPU (e.g., after GPU frustum culling). Takes a draw indirect buffer from a previous GPU pass, keeping all data on the GPU without CPU readback. The indirect buffer's instance count determines how many elements to sort.