On 12/15/2015 05:01 PM, Jordan Justen wrote: > On 2015-12-15 16:50:39, Ian Romanick wrote: >> On 12/15/2015 04:08 PM, Jordan Justen wrote: >>> The OpenGL ARB_compute_shader extension specfication requires at least >>> 1024 for GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, whereas OpenGLES 3.1 >>> only required 128. >> >> Does this mean that extensions->ARB_compute_shader is not set? > > Yes. I think we can't set this in some cases due to desktop GL > requirements, but we should still be able to support CS on ES 3.1. > >> I'm a little bit nervous about that. Are we sure that we check for >> compute shader support correctly everywhere (i.e., don't just check >> the extension bit that isn't set)? > > I think we have it pretty well covered. The ES 3.1 CTS seems pretty > happy with what we have. > > That said, patch 2 was yet another fix to use > _mesa_has_compute_shaders, and I wouldn't be surprised if we ended up > finding some more. (I did try to grep to find anything we might have > missed.)
I just did that too. I didn't see anything that looked problematic except: src/mesa/main/get.c:/* HACK: remove when ARB_compute_shader is actually supported */ This patch is Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> > -Jordan > >>> Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> >>> Cc: Ian Romanick <i...@freedesktop.org> >>> Cc: Marta Lofstedt <marta.lofst...@intel.com> >>> --- >>> src/mesa/main/version.c | 9 ++++++--- >>> 1 file changed, 6 insertions(+), 3 deletions(-) >>> >>> diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c >>> index e92bb11..112a73d 100644 >>> --- a/src/mesa/main/version.c >>> +++ b/src/mesa/main/version.c >>> @@ -433,7 +433,8 @@ compute_version_es1(const struct gl_extensions >>> *extensions) >>> } >>> >>> static GLuint >>> -compute_version_es2(const struct gl_extensions *extensions) >>> +compute_version_es2(const struct gl_extensions *extensions, >>> + const struct gl_constants *consts) >>> { >>> /* OpenGL ES 2.0 is derived from OpenGL 2.0 */ >>> const bool ver_2_0 = (extensions->ARB_texture_cube_map && >>> @@ -464,9 +465,11 @@ compute_version_es2(const struct gl_extensions >>> *extensions) >>> extensions->EXT_texture_snorm && >>> extensions->NV_primitive_restart && >>> extensions->OES_depth_texture_cube_map); >>> + const bool es31_compute_shader = >>> + consts->MaxComputeWorkGroupInvocations >= 128; >>> const bool ver_3_1 = (ver_3_0 && >>> extensions->ARB_arrays_of_arrays && >>> - extensions->ARB_compute_shader && >>> + es31_compute_shader && >>> extensions->ARB_draw_indirect && >>> extensions->ARB_explicit_uniform_location && >>> extensions->ARB_framebuffer_no_attachments && >>> @@ -508,7 +511,7 @@ _mesa_get_version(const struct gl_extensions >>> *extensions, >>> case API_OPENGLES: >>> return compute_version_es1(extensions); >>> case API_OPENGLES2: >>> - return compute_version_es2(extensions); >>> + return compute_version_es2(extensions, consts); >>> } >>> return 0; >>> } >>> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev