summaryrefslogtreecommitdiff
path: root/src/gpu/effect.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-31 18:14:35 +0100
committerskal <pascal.massimino@gmail.com>2026-01-31 18:14:35 +0100
commit0e9cfeb5855939ae5542943805dec8619ecc3c2d (patch)
tree017d665a29f7d3f9fe12cac40808a428c67da7e5 /src/gpu/effect.cc
parented33359c61b9eebd2b22ade478d2e01b3eb9cd89 (diff)
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.
Diffstat (limited to 'src/gpu/effect.cc')
-rw-r--r--src/gpu/effect.cc10
1 files changed, 10 insertions, 0 deletions
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;