Last active
November 7, 2017 11:24
-
-
Save ashleysommer/25118d366bf8c1608f3b1a64bc52d4e5 to your computer and use it in GitHub Desktop.
Fix COGL for AMDGPU-PRO drivers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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