Forked from ashleysommer/cogl_driver_gl_gl_cogl-driver-gl.c
Created
July 12, 2016 00:08
-
-
Save kasparsbergs/d619bd1221ded9c0900c0a7ecda4a439 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