Commit: 4b1ee71433eff9f81960d8d9238440b7445c748a
Parent: 1d105fb21e9c710a3e907d6d850dfabcdfdf5a02
Author: Randy Palamar
Date: Thu, 28 Nov 2024 15:05:26 -0700
update cuda lib bindings
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/beamformer.c b/beamformer.c
@@ -122,7 +122,7 @@ alloc_shader_storage(BeamformerCtx *ctx, Arena a)
ctx->cuda_lib.register_cuda_buffers(cs->rf_data_ssbos, ARRAY_COUNT(cs->rf_data_ssbos),
cs->raw_data_ssbo);
ctx->cuda_lib.init_cuda_configuration(bp->rf_raw_dim.E, bp->dec_data_dim.E,
- bp->channel_mapping, bp->channel_offset);
+ bp->channel_mapping);
break;
}
@@ -393,7 +393,8 @@ do_compute_shader(BeamformerCtx *ctx, BeamformFrame *frame, u32 raw_data_index,
csctx->last_output_ssbo_index = !csctx->last_output_ssbo_index;
break;
case CS_CUDA_DECODE:
- ctx->cuda_lib.cuda_decode(raw_data_index * rf_raw_size, output_ssbo_idx);
+ ctx->cuda_lib.cuda_decode(raw_data_index * rf_raw_size, output_ssbo_idx,
+ ctx->params->raw.channel_offset);
csctx->raw_data_fences[raw_data_index] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
csctx->last_output_ssbo_index = !csctx->last_output_ssbo_index;
break;
diff --git a/beamformer.h b/beamformer.h
@@ -86,7 +86,7 @@ typedef struct {
#define MAX_FRAMES_IN_FLIGHT 3
-#define INIT_CUDA_CONFIGURATION_FN(name) void name(u32 *input_dims, u32 *decoded_dims, u16 *channel_mapping, b32 rx_cols)
+#define INIT_CUDA_CONFIGURATION_FN(name) void name(u32 *input_dims, u32 *decoded_dims, u16 *channel_mapping)
typedef INIT_CUDA_CONFIGURATION_FN(init_cuda_configuration_fn);
INIT_CUDA_CONFIGURATION_FN(init_cuda_configuration_stub) {}
@@ -94,7 +94,7 @@ INIT_CUDA_CONFIGURATION_FN(init_cuda_configuration_stub) {}
typedef REGISTER_CUDA_BUFFERS_FN(register_cuda_buffers_fn);
REGISTER_CUDA_BUFFERS_FN(register_cuda_buffers_stub) {}
-#define CUDA_DECODE_FN(name) void name(size_t input_offset, u32 output_buffer_idx)
+#define CUDA_DECODE_FN(name) void name(size_t input_offset, u32 output_buffer_idx, u32 rf_channel_offset)
typedef CUDA_DECODE_FN(cuda_decode_fn);
CUDA_DECODE_FN(cuda_decode_stub) {}