From 5ceb0256792053ee80841f2b5ac0dfae1fd4c6f8 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 11 Feb 2026 11:58:24 +0100 Subject: fix: Complete auxiliary texture initialization fix Root cause: After swapping init/resize order, effects with Renderer3D crashed because resize() called before init() tried to use uninitialized GPU resources. Changes: - Add guards in FlashCubeEffect::resize() and Hybrid3DEffect::resize() to check ctx_.device before calling renderer_.resize() - Remove lazy initialization remnants from CircleMaskEffect and CNNEffect - Register auxiliary textures directly in init() (width_/height_ already set) - Remove ensure_texture() methods and texture_initialized_ flags All 36 tests passing. Demo runs without crashes. Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effects/circle_mask_effect.h | 3 --- 1 file changed, 3 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 91443d8..6ebaca1 100644 --- a/src/gpu/effects/circle_mask_effect.h +++ b/src/gpu/effects/circle_mask_effect.h @@ -29,11 +29,8 @@ class CircleMaskEffect : public Effect { static_assert(sizeof(CircleMaskParams) == 16, "CircleMaskParams must be 16 bytes for WGSL alignment"); - void ensure_texture(); - MainSequence* demo_ = nullptr; float radius_; - bool texture_initialized_ = false; WGPURenderPipeline compute_pipeline_ = nullptr; WGPUBindGroup compute_bind_group_ = nullptr; -- cgit v1.2.3