i965: Enable compute shaders in more cases for OpenGLES 3.1
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Dec 2015 23:51:25 +0000 (15:51 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 17 Dec 2015 04:37:23 +0000 (20:37 -0800)
Previously we were checking the desktop OpenGL ARB_compute_shader
requirements, but for OpenGLES 3.1, the requirements are lower.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
src/mesa/drivers/dri/i965/brw_context.c

index de4bc2cd2206e2dcd1aa042e4497abbfa7269f68..005c3236c8821d8a29a3fb737cf08d4f8edf2fb4 100644 (file)
@@ -379,7 +379,10 @@ brw_initialize_context_constants(struct brw_context *brw)
       [MESA_SHADER_GEOMETRY] = brw->gen >= 6,
       [MESA_SHADER_FRAGMENT] = true,
       [MESA_SHADER_COMPUTE] =
-         (ctx->Const.MaxComputeWorkGroupSize[0] >= 1024) ||
+         (ctx->API == API_OPENGL_CORE &&
+          ctx->Const.MaxComputeWorkGroupSize[0] >= 1024) ||
+         (ctx->API == API_OPENGLES2 &&
+          ctx->Const.MaxComputeWorkGroupSize[0] >= 128) ||
          _mesa_extension_override_enables.ARB_compute_shader,
    };