Commit: 376e1ac8fd68f712c6f488e144a462ac24c30cab
Parent: 5117be241ed53337c4ec13dc0484038aa785f035
Author: Randy Palamar
Date: Wed, 8 Jul 2026 05:14:06 -0700
core: remove asserts around vk_command_clear_buffer()
Frame size is already rounded up to 64 so the size and offset are
already always multiples of 4. This will still be the case if we
use F16 output.
Diffstat:
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/beamformer_core.c b/beamformer_core.c
@@ -1402,17 +1402,12 @@ complete_queue(BeamformerCtx *ctx, BeamformWorkQueue *q, Arena *arena)
vk_command_timestamp(cmd);
if (das_index >= 0) {
- u64 frame_size = beamformer_frame_byte_size(frame->points, frame->data_kind);
- GPUBuffer *backlog = cs->backlog.buffer;
-
- // TODO(rnp): this could be problematic if we support F16 output
- assert((frame_size % 4) == 0);
- assert((frame->buffer_offset % 4) == 0);
+ u64 frame_size = beamformer_frame_byte_size(frame->points, frame->data_kind);
+ GPUBuffer *backlog = cs->backlog.buffer;
vk_command_clear_buffer(cmd, backlog, frame->buffer_offset, frame_size, 0);
if (das_coherent) {
u64 coherent_size = frame_size / beamformer_data_kind_element_count[frame->data_kind];
- assert((coherent_size % 4) == 0);
vk_command_clear_buffer(cmd, backlog, backlog->size - coherent_size, coherent_size, 0);
}
}