-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Description
When calculating the counts for a each descriptor type in a descriptor pool acceleration structures are not placed in the array.
wgpu/wgpu-hal/src/vulkan/device.rs
Lines 393 to 421 in 959c2db
//Note: ignoring other types, since they can't appear here | |
let unfiltered_counts = [ | |
(vk::DescriptorType::SAMPLER, descriptor_count.sampler), | |
( | |
vk::DescriptorType::SAMPLED_IMAGE, | |
descriptor_count.sampled_image, | |
), | |
( | |
vk::DescriptorType::STORAGE_IMAGE, | |
descriptor_count.storage_image, | |
), | |
( | |
vk::DescriptorType::UNIFORM_BUFFER, | |
descriptor_count.uniform_buffer, | |
), | |
( | |
vk::DescriptorType::UNIFORM_BUFFER_DYNAMIC, | |
descriptor_count.uniform_buffer_dynamic, | |
), | |
( | |
vk::DescriptorType::STORAGE_BUFFER, | |
descriptor_count.storage_buffer, | |
), | |
( | |
vk::DescriptorType::STORAGE_BUFFER_DYNAMIC, | |
descriptor_count.storage_buffer_dynamic, | |
), | |
]; | |
This can lead to Out Of Memory errors on some platforms.
This may also be causing the OOMs in bindgroup creation from #6727 (but not the seg-faults).
Repro steps
Run any ray-tracing example (e.g ray_cube_compute
) on a gpu that cares about these (e.g an Intel Arc IGPU)
Expected vs observed behavior
We should allocate this correctly
Extra materials
Section of logs
[2025-01-05T09:28:39Z INFO wgpu_examples::framework] Entering event loop...
[2025-01-05T09:28:39Z INFO wgpu_examples::framework] Surface resume PhysicalSize { width: 800, height: 600 }
[2025-01-05T09:28:39Z INFO wgpu_core::device::ray_tracing] Created blas Id(0,1) with CreateBlasDescriptor { label: None, flags: AccelerationStructureFlags(PREFER_FAST_TRACE), update_mode: Build }
[2025-01-05T09:28:39Z INFO wgpu_core::device::ray_tracing] Created tlas Id(0,1) with CreateTlasDescriptor { label: None, max_instances: 64, flags: AccelerationStructureFlags(PREFER_FAST_TRACE), update_mode: Build }
[2025-01-05T09:28:39Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default
thread 'main' panicked at wgpu\src\backend\wgpu_core.rs:1175:26:
wgpu error: Validation Error
Caused by:
In Device::create_bind_group
Not enough memory left.
Platform
Trunk, Intel arc IGPU.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done