ogl_beamforming

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

Commit: 9c671842f78678995f2a30c6a7858a8df92b47f8
Parent: 4309cc50baa49661b39f119fbbb0b3318efad501
Author: Randy Palamar
Date:   Mon, 27 Jul 2026 18:29:40 -0700

util: EachBit: do not modify the passed in flags value

Diffstat:
Mbeamformer_core.c | 1+
Mutil.h | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/beamformer_core.c b/beamformer_core.c @@ -997,6 +997,7 @@ beamformer_commit_parameter_block(BeamformerCtx *ctx, BeamformerComputePlan *cp, beamformer_parameter_block_unlock(ctx->shared_memory, block)) for EachBit(pb->region_update_flags, region) { + pb->region_update_flags &= ~(1ul << region); switch (region) { case BeamformerParameterRegionFlag_NotifyUI:{ atomic_store_u32(&ctx->ui_dirty_parameter_blocks, 1u << block); diff --git a/util.h b/util.h @@ -124,7 +124,7 @@ typedef u64 uptr; #define DeferLoop(begin, end) for (i32 _i_ = ((begin), 0); !_i_; _i_ += 1, (end)) -#define EachBit(a, it) (u64 it = ctz_u64(a); it != 64; a &= ~(1u << (it)), it = ctz_u64(a)) +#define EachBit(a, it) (u64 _##it = a, it = ctz_u64( _##it ); it != 64; _##it &= ~(1u << (it)), it = ctz_u64( _##it )) #define EachElement(array, it) (u64 it = 0; it < countof(array); it += 1) #define EachEnumValue(type, it) (type it = (type)0; it < type##_Count; it = (type)(it + 1)) #define EachNonZeroEnumValue(type, it) (type it = (type)1; it < type##_Count; it = (type)(it + 1))