From ae724875852ba7f4307dff445b703e4430f76e14 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 4 Feb 2021 09:22:55 +0100 Subject: [PATCH] vrend: report compute cap on GL only if the GL version is at least 3.3 We requre version 330 when we create a compute shader on OpenGL, so we should also report the cap only when we have this version. Closes #200 Signed-off-by: Gert Wollny Reviewed-by: Eric Anholt --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 61608d0..cf31e64 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -10085,7 +10085,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c else caps->v2.max_vertex_attrib_stride = 2048; - if (has_feature(feat_compute_shader)) { + if (has_feature(feat_compute_shader) && (vrend_state.use_gles || gl_ver >= 33)) { glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, (GLint*)&caps->v2.max_compute_work_group_invocations); glGetIntegerv(GL_MAX_COMPUTE_SHARED_MEMORY_SIZE, (GLint*)&caps->v2.max_compute_shared_memory_size); glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, 0, (GLint*)&caps->v2.max_compute_grid_size[0]);