[Mesa-dev] [PATCH 01/13] i965: use _mesa_is_desktop_gl helper

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 7 11:54:41 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Use the helper over opencoding the check.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/mesa/drivers/dri/i965/brw_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 879daae7748..1bf39b07382 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -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) ||
-- 
2.14.1



More information about the mesa-dev mailing list