Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-03-16 10:58:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-18 22:59:27 +0300
commitd7df0dcccb50bbbc1e14cbe49bb128fa108b8a3e (patch)
tree82a855df4e730f9ccc79935d4221a65d556c0059 /source/blender/gpu/GPU_compute.h
parent7ee816e32f3655d4ca8abb555f885d8de9ba0520 (diff)
GPU: Add indirect dispatch support.
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.
Diffstat (limited to 'source/blender/gpu/GPU_compute.h')
-rw-r--r--source/blender/gpu/GPU_compute.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_compute.h b/source/blender/gpu/GPU_compute.h
index 437b0223303..6dfd6f73ae8 100644
--- a/source/blender/gpu/GPU_compute.h
+++ b/source/blender/gpu/GPU_compute.h
@@ -9,6 +9,7 @@
#include "BLI_sys_types.h"
#include "GPU_shader.h"
+#include "GPU_storage_buffer.h"
#ifdef __cplusplus
extern "C" {
@@ -19,6 +20,8 @@ void GPU_compute_dispatch(GPUShader *shader,
uint groups_y_len,
uint groups_z_len);
+void GPU_compute_dispatch_indirect(GPUShader *shader, GPUStorageBuf *indirect_buf);
+
#ifdef __cplusplus
}
#endif