refactor: Deprecating cache layout for now

This commit is contained in:
2026-11-22 16:58:05 +01:00
parent 42f85757d5
commit 34e5215001
14 changed files with 165 additions and 222 deletions
+2 -3
View File
@@ -12,9 +12,9 @@ use wgpu::util::DeviceExt;
pub struct NonZeroBufferCompactor
{
size: usize,
block_count: usize,
reduced_buffer: Buffer,
#[allow(unused)]
sum_buffer: Buffer,
count_buffer_bg_layout: BindGroupLayout,
compaction_bg: BindGroup,
@@ -178,7 +178,6 @@ impl NonZeroBufferCompactor
});
NonZeroBufferCompactor {
size,
block_count,
reduced_buffer,
sum_buffer,
@@ -230,7 +229,7 @@ impl NonZeroBufferCompactor
},
wgpu::BindGroupEntry {
binding: 2,
resource: compact_buffer.unwrap_or(&count_buffer).as_entire_binding(),
resource: compact_buffer.unwrap_or(count_buffer).as_entire_binding(),
},
],
});
+2 -2
View File
@@ -1,8 +1,8 @@
//! Provides utility object to manage indirect dispatches workgroup count computations on the GPU
use wgpu::Buffer;
use wgpu::CommandEncoder;
/// Provides utility object to manage indirect dispatches workgroup count computations on the GPU
/// Takes in a single u32, and computes the amount of workgroups to dispatch given a workgroup size
pub struct IndirectBuffer1D
{
+1 -1
View File
@@ -41,7 +41,7 @@ const LOG_SUB_BINS: u32 = SUB_BINS.trailing_zeros();
/// Threads per workgroup for the histogram and selection passes.
const WORKGROUP_SIZE: u32 = 256;
const _: () = assert!(BIN_COUNT % 32 == 0);
const _: () = assert!(BIN_COUNT.is_multiple_of(32));
const _: () = assert!(SUB_BINS.is_power_of_two());
/// Parameters passed to the shader through immediates.