i965: use _mesa_is_desktop_gl helper
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 24 Oct 2017 10:58:56 +0000 (11:58 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Nov 2017 14:06:56 +0000 (14:06 +0000)
Use the helper over opencoding the check.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/i965/brw_context.c

index 19d5a2e3503a9dd4b974440a85ba8186d8f3da1a..bc032dc5f69cf52c14c897e0fd953efc1c6573cc 100644 (file)
@@ -345,7 +345,7 @@ brw_initialize_context_constants(struct brw_context *brw)
       [MESA_SHADER_GEOMETRY] = devinfo->gen >= 6,
       [MESA_SHADER_FRAGMENT] = true,
       [MESA_SHADER_COMPUTE] =
-         ((ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGL_CORE) &&
+         (_mesa_is_desktop_gl(ctx) &&
           ctx->Const.MaxComputeWorkGroupSize[0] >= 1024) ||
          (ctx->API == API_OPENGLES2 &&
           ctx->Const.MaxComputeWorkGroupSize[0] >= 128) ||