ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: 38100c0706490eb8688aacde9614c2049af7f630
Parent: ba2fb5d57eecb37a64c2790694cd6d166f35c612
Author: Randy Palamar
Date:   Wed,  2 Oct 2024 08:35:56 -0600

enable sum shader when summing in multi-array case

Diffstat:
Mbeamformer.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/beamformer.c b/beamformer.c @@ -297,13 +297,16 @@ do_compute_shader(BeamformerCtx *ctx, enum compute_shaders shader) ORONE(ctx->out_data_dim.z / 32)); } if (bp->array_count > 1) { - if (ctx->out_data_dim.w > 0) + glUseProgram(csctx->programs[CS_SUM]); + glBindBufferBase(GL_UNIFORM_BUFFER, 0, csctx->shared_ubo); + if (ctx->out_data_dim.w > 0) { do_sum_shader(csctx, csctx->array_textures, bp->array_count, csctx->sum_textures[csctx->sum_texture_index], ctx->out_data_dim); - else + } else { do_sum_shader(csctx, csctx->array_textures, bp->array_count, ctx->out_texture, ctx->out_data_dim); + } } } break; case CS_SUM: {