Blender V4.3
gl_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 "gl_compute.hh"
10
11#include "gl_debug.hh"
12
13namespace blender::gpu {
14
15void GLCompute::dispatch(int group_x_len, int group_y_len, int group_z_len)
16{
17 GL_CHECK_RESOURCES("Compute");
18
19 /* Sometime we reference a dispatch size but we want to skip it by setting one dimension to 0.
20 * Avoid error being reported on some implementation for these case. */
21 if (group_x_len == 0 || group_y_len == 0 || group_z_len == 0) {
22 return;
23 }
24
25 glDispatchCompute(group_x_len, group_y_len, group_z_len);
26}
27
28} // namespace blender::gpu
static void dispatch(int group_x_len, int group_y_len, int group_z_len)
Definition gl_compute.cc:15
#define GL_CHECK_RESOURCES(info)
Definition gl_debug.hh:65