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 <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
macos/master
Gert Wollny 4 years ago
parent 1e1dbbd0e7
commit ae72487585
  1. 2
      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 else
caps->v2.max_vertex_attrib_stride = 2048; 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_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); 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]); glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, 0, (GLint*)&caps->v2.max_compute_grid_size[0]);

Loading…
Cancel
Save