Blender V5.0
gpu_compute.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "GPU_compute.hh"
10
11#include "gpu_backend.hh"
12#include "gpu_debug_private.hh"
13
15 uint groups_x_len,
16 uint groups_y_len,
17 uint groups_z_len,
19{
21 GPU_shader_bind(shader, constants_state);
22#ifndef NDEBUG
24#endif
25 gpu_backend.compute_dispatch(groups_x_len, groups_y_len, groups_z_len);
26}
27
30 blender::gpu::StorageBuf *indirect_buf_,
32{
34 blender::gpu::StorageBuf *indirect_buf = reinterpret_cast<blender::gpu::StorageBuf *>(
35 indirect_buf_);
36
37 GPU_shader_bind(shader, constants_state);
38#ifndef NDEBUG
40#endif
41 gpu_backend.compute_dispatch_indirect(indirect_buf);
42}
unsigned int uint
void GPU_shader_bind(blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
static GPUBackend * get()
virtual void compute_dispatch_indirect(StorageBuf *indirect_buf)=0
virtual void compute_dispatch(int groups_x_len, int groups_y_len, int groups_z_len)=0
void GPU_compute_dispatch(blender::gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const blender::gpu::shader::SpecializationConstants *constants_state)
void GPU_compute_dispatch_indirect(blender::gpu::Shader *shader, blender::gpu::StorageBuf *indirect_buf_, const blender::gpu::shader::SpecializationConstants *constants_state)
void debug_validate_binding_image_format()
Definition gpu_debug.cc:170