Commit: 62b6d4a0d8638c532d4933a570f92e702bdf50c6
Parent: 4fb30729f747edff7c70b350d5c72963cc303fdf
Author: Randy Palamar
Date: Mon, 7 Oct 2024 09:30:10 -0600
rename array_count to xdc_count
Diffstat:
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/beamformer.c b/beamformer.c
@@ -47,10 +47,10 @@ alloc_output_image(BeamformerCtx *ctx)
}
}
- bp->array_count = CLAMP(bp->array_count, 1, ARRAY_COUNT(cs->array_textures));
+ bp->xdc_count = CLAMP(bp->xdc_count, 1, ARRAY_COUNT(cs->array_textures));
glDeleteTextures(ARRAY_COUNT(cs->array_textures), cs->array_textures);
- glGenTextures(bp->array_count, cs->array_textures);
- for (u32 i = 0; i < bp->array_count; i++) {
+ glGenTextures(bp->xdc_count, cs->array_textures);
+ for (u32 i = 0; i < bp->xdc_count; i++) {
glBindTexture(GL_TEXTURE_3D, cs->array_textures[i]);
glTexStorage3D(GL_TEXTURE_3D, ctx->out_texture_mips, GL_RG32F, odim.x, odim.y, odim.z);
}
@@ -285,9 +285,9 @@ do_compute_shader(BeamformerCtx *ctx, enum compute_shaders shader)
glUniform3iv(csctx->volume_export_dim_offset_id, 1, (i32 []){0, 0, 0});
glUniform1i(csctx->volume_export_pass_id, 0);
- for (u32 i = 0; i < bp->array_count; i++) {
+ for (u32 i = 0; i < bp->xdc_count; i++) {
u32 texture;
- if (bp->array_count == 1) {
+ if (bp->xdc_count == 1) {
if (ctx->out_data_dim.w > 1) {
texture = csctx->sum_textures[csctx->sum_texture_index];
} else {
@@ -308,14 +308,14 @@ do_compute_shader(BeamformerCtx *ctx, enum compute_shaders shader)
ctx->out_data_dim.y,
ORONE(ctx->out_data_dim.z / 32));
}
- if (bp->array_count > 1) {
+ if (bp->xdc_count > 1) {
glUseProgram(csctx->programs[CS_SUM]);
glBindBufferBase(GL_UNIFORM_BUFFER, 0, csctx->shared_ubo);
u32 out;
if (ctx->out_data_dim.w > 1) out = csctx->sum_textures[csctx->sum_texture_index];
else out = ctx->out_texture;
- do_sum_shader(csctx, csctx->array_textures, bp->array_count,
- 1 / (f32)bp->array_count, out, ctx->out_data_dim);
+ do_sum_shader(csctx, csctx->array_textures, bp->xdc_count,
+ 1 / (f32)bp->xdc_count, out, ctx->out_data_dim);
}
} break;
case CS_SUM: {
diff --git a/beamformer_parameters.h b/beamformer_parameters.h
@@ -25,7 +25,7 @@ typedef struct {
v4 output_min_coordinate; /* [m] Back-Top-Left corner of output region (w ignored) */
v4 output_max_coordinate; /* [m] Front-Bottom-Right corner of output region (w ignored)*/
uv2 rf_raw_dim; /* Raw Data Dimensions */
- u32 array_count; /* Number of Arrays (4 max) */
+ u32 xdc_count; /* Number of Transducer Arrays (4 max) */
u32 channel_offset; /* Offset into channel_mapping: 0 or 128 (rows or columns) */
u32 lpf_order; /* Order of Low Pass Filter */
f32 speed_of_sound; /* [m/s] */
diff --git a/shaders/demod.glsl b/shaders/demod.glsl
@@ -22,7 +22,7 @@ layout(std140, binding = 0) uniform parameters {
vec4 output_min_coord; /* [m] Top left corner of output region */
vec4 output_max_coord; /* [m] Bottom right corner of output region */
uvec2 rf_raw_dim; /* Raw Data Dimensions */
- uint array_count; /* Number of Arrays (4 max) */
+ uint xdc_count; /* Number of Transducer Arrays (4 max) */
uint channel_offset; /* Offset into channel_mapping: 0 or 128 (rows or columns) */
uint lpf_order; /* Order of Low Pass Filter */
float speed_of_sound; /* [m/s] */
diff --git a/shaders/hadamard.glsl b/shaders/hadamard.glsl
@@ -26,7 +26,7 @@ layout(std140, binding = 0) uniform parameters {
vec4 output_min_coord; /* [m] Top left corner of output region */
vec4 output_max_coord; /* [m] Bottom right corner of output region */
uvec2 rf_raw_dim; /* Raw Data Dimensions */
- uint array_count; /* Number of Arrays (4 max) */
+ uint xdc_count; /* Number of Transducer Arrays (4 max) */
uint channel_offset; /* Offset into channel_mapping: 0 or 128 (rows or columns) */
uint lpf_order; /* Order of Low Pass Filter */
float speed_of_sound; /* [m/s] */
diff --git a/shaders/hercules.glsl b/shaders/hercules.glsl
@@ -18,7 +18,7 @@ layout(std140, binding = 0) uniform parameters {
vec4 output_min_coord; /* [m] Top left corner of output region */
vec4 output_max_coord; /* [m] Bottom right corner of output region */
uvec2 rf_raw_dim; /* Raw Data Dimensions */
- uint array_count; /* Number of Arrays (4 max) */
+ uint xdc_count; /* Number of Transducer Arrays (4 max) */
uint channel_offset; /* Offset into channel_mapping: 0 or 128 (rows or columns) */
uint lpf_order; /* Order of Low Pass Filter */
float speed_of_sound; /* [m/s] */
@@ -141,7 +141,7 @@ void main()
}
/* NOTE: skip over channels corresponding to other arrays */
- uint ridx = u_xdc_index * (dec_data_dim.y / array_count) * dec_data_dim.x * dec_data_dim.z;
+ uint ridx = u_xdc_index * (dec_data_dim.y / xdc_count) * dec_data_dim.x * dec_data_dim.z;
int direction = beamform_plane * (u_volume_export_pass ^ 1);
/* NOTE: For Each Acquistion in Raw Data */
for (uint i = 0; i < dec_data_dim.z; i++) {
diff --git a/shaders/uforces.glsl b/shaders/uforces.glsl
@@ -18,7 +18,7 @@ layout(std140, binding = 0) uniform parameters {
vec4 output_min_coord; /* [m] Top left corner of output region */
vec4 output_max_coord; /* [m] Bottom right corner of output region */
uvec2 rf_raw_dim; /* Raw Data Dimensions */
- uint array_count; /* Number of Arrays (4 max) */
+ uint xdc_count; /* Number of Transducer Arrays (4 max) */
uint channel_offset; /* Offset into channel_mapping: 0 or 128 (rows or columns) */
uint lpf_order; /* Order of Low Pass Filter */
float speed_of_sound; /* [m/s] */
@@ -121,7 +121,7 @@ void main()
vec2 sum = vec2(0);
/* NOTE: skip over channels corresponding to other arrays */
- uint ridx = u_xdc_index * (dec_data_dim.y / array_count) * dec_data_dim.x * dec_data_dim.z;
+ uint ridx = u_xdc_index * (dec_data_dim.y / xdc_count) * dec_data_dim.x * dec_data_dim.z;
/* NOTE: skip first acquisition in uforces since its garbage */
ridx += dec_data_dim.y * dec_data_dim.x * uforces;
for (uint i = uforces; i < dec_data_dim.z; i++) {