summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/gpu/ra.h1
-rw-r--r--video/out/opengl/ra_gl.c1
-rw-r--r--video/out/vulkan/ra_vk.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h
index 34f3fb9b5c..f1037e45c3 100644
--- a/video/out/gpu/ra.h
+++ b/video/out/gpu/ra.h
@@ -54,6 +54,7 @@ enum {
RA_CAP_GATHER = 1 << 9, // supports textureGather in GLSL
RA_CAP_FRAGCOORD = 1 << 10, // supports reading from gl_FragCoord
RA_CAP_PARALLEL_COMPUTE = 1 << 11, // supports parallel compute shaders
+ RA_CAP_NUM_GROUPS = 1 << 12, // supports gl_NumWorkGroups
};
enum ra_ctype {
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index 72b411a16f..356ed81d03 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -101,6 +101,7 @@ static int ra_init_gl(struct ra *ra, GL *gl)
{RA_CAP_TEX_1D, MPGL_CAP_1D_TEX},
{RA_CAP_TEX_3D, MPGL_CAP_3D_TEX},
{RA_CAP_COMPUTE, MPGL_CAP_COMPUTE_SHADER},
+ {RA_CAP_NUM_GROUPS, MPGL_CAP_COMPUTE_SHADER},
{RA_CAP_NESTED_ARRAY, MPGL_CAP_NESTED_ARRAY},
};
diff --git a/video/out/vulkan/ra_vk.c b/video/out/vulkan/ra_vk.c
index 5e6fae74ed..cffb895cfd 100644
--- a/video/out/vulkan/ra_vk.c
+++ b/video/out/vulkan/ra_vk.c
@@ -209,7 +209,7 @@ struct ra *ra_create_vk(struct mpvk_ctx *vk, struct mp_log *log)
ra->max_pushc_size = vk->limits.maxPushConstantsSize;
if (vk->pool_compute) {
- ra->caps |= RA_CAP_COMPUTE;
+ ra->caps |= RA_CAP_COMPUTE | RA_CAP_NUM_GROUPS;
// If we have more compute queues than graphics queues, we probably
// want to be using them. (This seems mostly relevant for AMD)
if (vk->pool_compute->num_queues > vk->pool_graphics->num_queues)