Skip to content

Instantly share code, notes, and snippets.

@ashleysommer
Last active November 7, 2017 11:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ashleysommer/25118d366bf8c1608f3b1a64bc52d4e5 to your computer and use it in GitHub Desktop.
Save ashleysommer/25118d366bf8c1608f3b1a64bc52d4e5 to your computer and use it in GitHub Desktop.
Fix COGL for AMDGPU-PRO drivers
--- a/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -403,9 +403,13 @@
&ctx->glsl_minor);
}
- if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2))
- /* We want to use version 120 if it is available so that the
- * gl_PointCoord can be used. */
+ if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 5))
+ ctx->glsl_version_to_use = 150;
+ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 4))
+ ctx->glsl_version_to_use = 140;
+ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 3))
+ ctx->glsl_version_to_use = 130;
+ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2))
ctx->glsl_version_to_use = 120;
else
ctx->glsl_version_to_use = 110;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment