mesa: Don't advertise GLES 3.1 without compute support
authorDaniel Scharrer <daniel@constexpr.org>
Tue, 19 Apr 2016 14:57:06 +0000 (16:57 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 18 May 2016 16:21:21 +0000 (18:21 +0200)
The MaxComputeWorkGroupInvocations constant is used in
compute_version_es2() instead of extensions->ARB_compute_shader
as ES has lower requirements than desktop GL.

Both i965 and gallium set this constant before enabling compute support.

Signed-off-by: Daniel Scharrer <daniel@constexpr.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/context.c

index 6af02d1c3dcee575a64b9567b4c17ceb98c1824b..f6907991c75358ef1ffe2bfd503024d2a5d34bc6 100644 (file)
@@ -708,7 +708,8 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
    consts->MaxComputeWorkGroupSize[0] = 1024;
    consts->MaxComputeWorkGroupSize[1] = 1024;
    consts->MaxComputeWorkGroupSize[2] = 64;
-   consts->MaxComputeWorkGroupInvocations = 1024;
+   /* Enables compute support for GLES 3.1 if >= 128 */
+   consts->MaxComputeWorkGroupInvocations = 0;
 
    /** GL_ARB_gpu_shader5 */
    consts->MinFragmentInterpolationOffset = MIN_FRAGMENT_INTERPOLATION_OFFSET;