diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-01 01:41:01 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-01 01:41:01 +0100 |
| commit | e6e34e551a73e65301685071445aaec9aaf60fd2 (patch) | |
| tree | 40b374b0137abc71c121ef5f94d1a5ba645108cd /src/gpu/effects/passthrough_effect.cc | |
| parent | 709067df5303ddf0715f56903ccfdb877cb4db7e (diff) | |
Refactor: Move common GPU fields to base Effect classes
Moved WGPUDevice, WGPUQueue, and GpuBuffer uniforms_ into the base Effect
and PostProcessEffect classes. Updated all derived effect classes to use
these inherited members and refactored their constructors. Also fixed
associated compilation errors in test files and adjusted a printf statement.
Diffstat (limited to 'src/gpu/effects/passthrough_effect.cc')
| -rw-r--r-- | src/gpu/effects/passthrough_effect.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/effects/passthrough_effect.cc b/src/gpu/effects/passthrough_effect.cc index a00f661..cb92ba1 100644 --- a/src/gpu/effects/passthrough_effect.cc +++ b/src/gpu/effects/passthrough_effect.cc @@ -5,14 +5,14 @@ #include "gpu/gpu.h" // --- PassthroughEffect --- -PassthroughEffect::PassthroughEffect(WGPUDevice device, +PassthroughEffect::PassthroughEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format) - : device_(device) { + : PostProcessEffect(device, queue) { uniforms_ = - gpu_create_buffer(device, sizeof(float) * 4, + gpu_create_buffer(device_, sizeof(float) * 4, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); pipeline_ = - create_post_process_pipeline(device, format, passthrough_shader_wgsl); + create_post_process_pipeline(device_, format, passthrough_shader_wgsl); } void PassthroughEffect::update_bind_group(WGPUTextureView input_view) { pp_update_bind_group(device_, pipeline_, &bind_group_, input_view, uniforms_); |
