Blender V4.3
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
9#include "GPU_compute.hh"
10
11#include "gpu_backend.hh"
12
14 uint groups_x_len,
15 uint groups_y_len,
16 uint groups_z_len)
17{
19 GPU_shader_bind(shader);
20 gpu_backend.compute_dispatch(groups_x_len, groups_y_len, groups_z_len);
21}
22
23void GPU_compute_dispatch_indirect(GPUShader *shader, GPUStorageBuf *indirect_buf_)
24{
26 blender::gpu::StorageBuf *indirect_buf = reinterpret_cast<blender::gpu::StorageBuf *>(
27 indirect_buf_);
28
29 GPU_shader_bind(shader);
30 gpu_backend.compute_dispatch_indirect(indirect_buf);
31}
unsigned int uint
void GPU_shader_bind(GPUShader *shader)
struct GPUShader GPUShader
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_indirect(GPUShader *shader, GPUStorageBuf *indirect_buf_)
void GPU_compute_dispatch(GPUShader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len)