This uses a StorageBuf as the source of indirect dispatch argument. The user needs to make sure the parameters are in the right order. There is no support for argument offset for the moment as there is no need for it. But this might be added in the future. Note that the indirect buffer is synchronized at the backend level. This is done for practical reasons and because this feature is almost always used for GPU driven pipeline.
23 lines
382 B
C++
23 lines
382 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#include "gl_compute.hh"
|
|
|
|
#include "gl_debug.hh"
|
|
|
|
#include "glew-mx.h"
|
|
|
|
namespace blender::gpu {
|
|
|
|
void GLCompute::dispatch(int group_x_len, int group_y_len, int group_z_len)
|
|
{
|
|
GL_CHECK_RESOURCES("Compute");
|
|
|
|
glDispatchCompute(group_x_len, group_y_len, group_z_len);
|
|
}
|
|
|
|
} // namespace blender::gpu
|