diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-17 08:16:03 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-17 08:16:03 +0100 |
| commit | 64f977f6fbedf75d5edbc3963e002b593c8428d8 (patch) | |
| tree | ef711b63d34b5c3f5ecc93d46a0a3ab0b6d26a6f /src/effects/peak_meter_effect.cc | |
| parent | 8c9332c16b44270921eb1b6a2886717eb3435d5d (diff) | |
style: Apply clang-format
Diffstat (limited to 'src/effects/peak_meter_effect.cc')
| -rw-r--r-- | src/effects/peak_meter_effect.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/effects/peak_meter_effect.cc b/src/effects/peak_meter_effect.cc index 124c59b..a2cf6fc 100644 --- a/src/effects/peak_meter_effect.cc +++ b/src/effects/peak_meter_effect.cc @@ -6,8 +6,8 @@ #include "util/fatal_error.h" PeakMeter::PeakMeter(const GpuContext& ctx, - const std::vector<std::string>& inputs, - const std::vector<std::string>& outputs) + const std::vector<std::string>& inputs, + const std::vector<std::string>& outputs) : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr) { HEADLESS_RETURN_IF_NULL(ctx_.device); @@ -58,19 +58,20 @@ PeakMeter::PeakMeter(const GpuContext& ctx, std::string shader_code = ShaderComposer::Get().Compose({"common_uniforms"}, shader_main); - pipeline_ = create_post_process_pipeline(ctx_.device, - WGPUTextureFormat_RGBA8Unorm, - shader_code.c_str()); + pipeline_ = create_post_process_pipeline( + ctx_.device, WGPUTextureFormat_RGBA8Unorm, shader_code.c_str()); } PeakMeter::~PeakMeter() { - if (bind_group_) wgpuBindGroupRelease(bind_group_); - if (pipeline_) wgpuRenderPipelineRelease(pipeline_); + if (bind_group_) + wgpuBindGroupRelease(bind_group_); + if (pipeline_) + wgpuRenderPipelineRelease(pipeline_); } void PeakMeter::render(WGPUCommandEncoder encoder, - const UniformsSequenceParams& params, - NodeRegistry& nodes) { + const UniformsSequenceParams& params, + NodeRegistry& nodes) { WGPUTextureView input_view = nodes.get_view(input_nodes_[0]); WGPUTextureView output_view = nodes.get_view(output_nodes_[0]); @@ -89,7 +90,8 @@ void PeakMeter::render(WGPUCommandEncoder encoder, pass_desc.colorAttachmentCount = 1; pass_desc.colorAttachments = &color_attachment; - WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); + WGPURenderPassEncoder pass = + wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); wgpuRenderPassEncoderSetPipeline(pass, pipeline_); wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr); wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0); |
