MCPcopy Create free account
hub / github.com/alibaba/MNN / VulkanRasterSort

Method VulkanRasterSort

source/backend/vulkan/buffer/render/VulkanGaussianRender.cpp:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 }
31};
32VulkanRasterSort::VulkanRasterSort(Backend* bn) : VulkanBasicExecution(bn) {
33 mContent = new Content(static_cast<VulkanBackend*>(bn));
34 auto extra = static_cast<VulkanBackend*>(bn);
35 mLocalSize = std::min(mLocalSize, extra->device().getMaxComputeWorkGroupInvocations());
36 {
37 std::vector<uint32_t> spc = {(uint32_t)256, 1, 1};
38 std::vector<VkDescriptorType> types {
39 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
40 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
41 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
42 };
43 if (extra->device().getLocalMemorySize() > 0) {
44 mContent->cumsum = extra->getPipelineFactory()->getPipeline("glsl_cumsum_comp", types, spc);
45 } else {
46 mContent->cumsum = extra->getPipelineFactory()->getPipeline("glsl_cumsum_single_comp", types, spc);
47 }
48 }
49 mRadixSort.reset(new VulkanRadixSort(bn, 16));
50}
51VulkanRasterSort:: ~VulkanRasterSort() {
52 delete mContent;
53}

Callers

nothing calls this directly

Calls 6

getLocalMemorySizeMethod · 0.80
getPipelineFactoryMethod · 0.80
minFunction · 0.50
getPipelineMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected