webgpu
webgpu copied to clipboard
Error: Out of memory Error: vkAllocateMemory failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
Hello @maierfelix
I use procedural geometry and add 4 million instances to top level acceleration structure(bottom level acceleration structure only has 1 aabb), then when I run the demo, it error:
Error: Out of memory Error: vkAllocateMemory failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
at CheckVkOOMThenSuccessImpl (../../src/dawn_native/vulkan/VulkanError.cpp:94)
at AllocateResourceHeap (../../src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp:87)
at Allocate (../../src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp:140)
at Initialize (../../src/dawn_native/vulkan/BufferVk.cpp:171)
at Create (../../src/dawn_native/vulkan/BufferVk.cpp:125)
at device._onErrorCallback (D:\Github\WebGPU-Example\node_modules\wonder-webgpu\index.js:57:21)
at _buildContainers (file:///D:/Github/WebGPU-Example/packages/arc_ray_tracing_pipeline/src/pipeline/jobs/init/InitRayTracingPassJob.js:148:36)
at exec (file:///D:/Github/WebGPU-Example/packages/arc_ray_tracing_pipeline/src/pipeline/jobs/init/InitRayTracingPassJob.js:179:29)
at exec (file:///D:/Github/WebGPU-Example/packages/arc_ray_tracing_pipeline/src/pipeline/InitPipeline.js:19:13)
at async _main (file:///D:/Github/WebGPU-Example/packages/arc_ray_tracing_pipeline/src/index.js:52:13)
I want to add at least >10 million instances to top level acceleration structure! How to handle the error?
Thank you very much!
VkPhysicalDeviceAccelerationStructurePropertiesKHR can set maxInstanceCount, but in WebGPU Ray-Tracing SPEC can't find it!