From fd19130b3360d17b44247ec26533b20e051b7f8c Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 9 Feb 2026 11:17:53 +0100 Subject: feat: WGSL Uniform Buffer Validation & Consolidation (Task #75) - Added to validate WGSL/C++ struct alignment. - Integrated validation into . - Standardized uniform usage in , , , . - Renamed generic to specific names in WGSL and C++ to avoid collisions. - Added and updated . - handoff(Gemini): Completed Task #75. --- src/gpu/effects/circle_mask_effect.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gpu/effects/circle_mask_effect.h') diff --git a/src/gpu/effects/circle_mask_effect.h b/src/gpu/effects/circle_mask_effect.h index ac44210..bf9cdfb 100644 --- a/src/gpu/effects/circle_mask_effect.h +++ b/src/gpu/effects/circle_mask_effect.h @@ -21,10 +21,12 @@ class CircleMaskEffect : public Effect { float intensity, float aspect_ratio) override; private: - struct EffectParams { + struct CircleMaskParams { float radius; float _pad[3]; }; + static_assert(sizeof(CircleMaskParams) == 16, + "CircleMaskParams must be 16 bytes for WGSL alignment"); MainSequence* demo_ = nullptr; float radius_; @@ -32,7 +34,7 @@ class CircleMaskEffect : public Effect { WGPURenderPipeline compute_pipeline_ = nullptr; WGPUBindGroup compute_bind_group_ = nullptr; UniformBuffer compute_uniforms_; - UniformBuffer compute_params_; + UniformBuffer compute_params_; WGPURenderPipeline render_pipeline_ = nullptr; WGPUBindGroup render_bind_group_ = nullptr; -- cgit v1.2.3