From 542958a8e97f8a000a9c8434408884cb9cb63705 Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 12 Feb 2026 11:39:24 +0100 Subject: CNN v2 Phase 5: render pipeline implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complete multi-pass compute execution for CNNv2Effect. Implementation: - Layer texture creation (ping-pong buffers for intermediate results) - Static features compute pipeline with bind group layout - Bind group creation with 5 bindings (input mips + depth + output) - compute() override for multi-pass execution - Static features pass with proper workgroup dispatch Architecture: - Static features: 8×f16 packed as 4×u32 (RGBD + UV + sin + bias) - Layer buffers: 2×RGBA32Uint textures (8 channels f16 each) - Input mips: 3 levels (0, 1, 2) for multi-scale features - Workgroup size: 8×8 threads Status: - Static features compute pass functional - Layer pipeline infrastructure ready - All 36/36 tests passing Next: Layer shader integration, multi-layer execution Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effects/cnn_v2_effect.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gpu/effects/cnn_v2_effect.h') diff --git a/src/gpu/effects/cnn_v2_effect.h b/src/gpu/effects/cnn_v2_effect.h index edf301e..facf4c3 100644 --- a/src/gpu/effects/cnn_v2_effect.h +++ b/src/gpu/effects/cnn_v2_effect.h @@ -12,6 +12,8 @@ public: void init(MainSequence* demo) override; void resize(int width, int height) override; + void compute(WGPUCommandEncoder encoder, + const CommonPostProcessUniforms& uniforms) override; void render(WGPURenderPassEncoder pass, const CommonPostProcessUniforms& uniforms) override; void update_bind_group(WGPUTextureView input_view) override; @@ -36,6 +38,7 @@ private: // Input mips WGPUTexture input_mip_tex_; WGPUTextureView input_mip_view_[3]; + WGPUTextureView current_input_view_; // Cached input from update_bind_group bool initialized_; }; -- cgit v1.2.3