diff options
Diffstat (limited to 'src/gpu/demo_effects.cc')
| -rw-r--r-- | src/gpu/demo_effects.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/demo_effects.cc b/src/gpu/demo_effects.cc index 27712d3..77fb152 100644 --- a/src/gpu/demo_effects.cc +++ b/src/gpu/demo_effects.cc @@ -320,8 +320,7 @@ static void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, WGPUBindGroup *bind_group, WGPUTextureView input_view, GpuBuffer uniforms) { - if (*bind_group) - wgpuBindGroupRelease(*bind_group); + if (*bind_group) wgpuBindGroupRelease(*bind_group); WGPUBindGroupLayout bgl = wgpuRenderPipelineGetBindGroupLayout(pipeline, 0); WGPUSamplerDescriptor sd = {}; sd.magFilter = WGPUFilterMode_Linear; @@ -386,8 +385,7 @@ ParticleSprayEffect::ParticleSprayEffect(WGPUDevice device, WGPUQueue queue, gpu_create_buffer(device, sizeof(float) * 4, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); std::vector<Particle> init_p(NUM_PARTICLES); - for (auto &p : init_p) - p.pos[3] = 0.0f; + for (auto &p : init_p) p.pos[3] = 0.0f; particles_buffer_ = gpu_create_buffer( device, sizeof(Particle) * NUM_PARTICLES, WGPUBufferUsage_Storage | WGPUBufferUsage_Vertex, init_p.data()); |
