diff options
Diffstat (limited to 'src/effects/peak_meter_effect.cc')
| -rw-r--r-- | src/effects/peak_meter_effect.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/effects/peak_meter_effect.cc b/src/effects/peak_meter_effect.cc index 63be2c0..d077302 100644 --- a/src/effects/peak_meter_effect.cc +++ b/src/effects/peak_meter_effect.cc @@ -12,7 +12,7 @@ PeakMeter::PeakMeter(const GpuContext& ctx, : Effect(ctx, inputs, outputs, start_time, end_time), pipeline_(nullptr), bind_group_(nullptr) { HEADLESS_RETURN_IF_NULL(ctx_.device); - uniforms_buffer_.init(ctx_.device); + init_uniforms_buffer(); const char* shader_main = R"( struct VertexOutput { @@ -81,11 +81,8 @@ void PeakMeter::render(WGPUCommandEncoder encoder, uniforms_buffer_.get(), {nullptr, 0}); WGPURenderPassColorAttachment color_attachment = {}; - color_attachment.view = output_view; - color_attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED; + gpu_init_color_attachment(color_attachment, output_view); color_attachment.loadOp = WGPULoadOp_Load; - color_attachment.storeOp = WGPUStoreOp_Store; - color_attachment.clearValue = {0.0, 0.0, 0.0, 1.0}; WGPURenderPassDescriptor pass_desc = {}; pass_desc.colorAttachmentCount = 1; |
