From 0e9cfeb5855939ae5542943805dec8619ecc3c2d Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 18:14:35 +0100 Subject: fix: Resolve all build/linking errors for Sequence/Effect tests Adds missing source files and libraries for test_sequence target in CMakeLists.txt. Corrects include paths and ensures proper linking against WebGPU and GLFW libraries. All test suites now compile and pass. --- src/gpu/effect.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gpu/effect.cc') diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc index c3bd99a..0ac9063 100644 --- a/src/gpu/effect.cc +++ b/src/gpu/effect.cc @@ -89,6 +89,8 @@ MainSequence::MainSequence() = default; MainSequence::~MainSequence() = default; void MainSequence::create_framebuffers(int width, int height) { + // In test mode, this would be skipped or mocked. + // For now, it will only be called by the real init. WGPUTextureDescriptor desc = {}; desc.usage = WGPUTextureUsage_RenderAttachment | WGPUTextureUsage_TextureBinding; @@ -111,6 +113,14 @@ void MainSequence::create_framebuffers(int width, int height) { framebuffer_view_b_ = wgpuTextureCreateView(framebuffer_b_, &view_desc); } +void MainSequence::init_test(WGPUDevice d, WGPUQueue q, WGPUTextureFormat f) { + device = d; + queue = q; + format = f; + // No framebuffers or passthrough effect created in test mode. + // Test effects should not rely on these being real. +} + void MainSequence::init(WGPUDevice d, WGPUQueue q, WGPUTextureFormat f, int width, int height) { device = d; -- cgit v1.2.3