[120376] trunk/dports/x11/mesa
jeremyhu at macports.org
jeremyhu at macports.org
Sat May 24 21:44:49 PDT 2014
Revision: 120376
https://trac.macports.org/changeset/120376
Author: jeremyhu at macports.org
Date: 2014-05-24 21:44:49 -0700 (Sat, 24 May 2014)
Log Message:
-----------
mesa: Add missing patch
Modified Paths:
--------------
trunk/dports/x11/mesa/Portfile
Added Paths:
-----------
trunk/dports/x11/mesa/files/0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch
Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile 2014-05-25 03:45:38 UTC (rev 120375)
+++ trunk/dports/x11/mesa/Portfile 2014-05-25 04:44:49 UTC (rev 120376)
@@ -41,6 +41,7 @@
0009-mesa-test-for-GL_EXT_framebuffer_sRGB-in-glPopAttrib.patch \
0011-Apple-glFlush-is-not-needed-with-CGLFlushDrawable.patch \
0012-glapi-Avoid-heap-corruption-in-_glapi_table.patch \
+ 0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch \
1001-appleglx-Improve-error-reporting-if-CGLChoosePixelFo.patch \
1002-darwin-Write-errors-in-choosing-the-pixel-format-to-.patch \
1003-darwin-Guard-Core-Profile-usage-behind-a-testing-env.patch
Added: trunk/dports/x11/mesa/files/0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch
===================================================================
--- trunk/dports/x11/mesa/files/0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch (rev 0)
+++ trunk/dports/x11/mesa/files/0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch 2014-05-25 04:44:49 UTC (rev 120376)
@@ -0,0 +1,40 @@
+From ba59a779ed41e08fa16805c1c60da39885546d0e Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Tue, 20 May 2014 10:53:00 -0700
+Subject: [PATCH 13/13] darwin: Fix test for kCGLPFAOpenGLProfile support at
+ runtime
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+(cherry picked from commit 7a109268ab5b3544e7f7b99e84ef1fdf54023fb4)
+---
+ src/glx/apple/apple_visual.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
+index 282934f..238c248 100644
+--- a/src/glx/apple/apple_visual.c
++++ b/src/glx/apple/apple_visual.c
+@@ -73,11 +73,15 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
+ GLint vsref = 0;
+ CGLError error = 0;
+
+- /* Request an OpenGL 3.2 profile if one is available */
+- if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
+- attr[numattr++] = kCGLPFAOpenGLProfile;
+- attr[numattr++] = kCGLOGLPVersion_3_2_Core;
+- }
++ /* Request an OpenGL 3.2 profile if one is available and supported */
++ attr[numattr++] = kCGLPFAOpenGLProfile;
++ attr[numattr++] = kCGLOGLPVersion_3_2_Core;
++
++ /* Test for kCGLPFAOpenGLProfile support at runtime and roll it out if not supported */
++ attr[numattr] = 0;
++ error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
++ if (error == kCGLBadAttribute)
++ numattr -= 2;
+
+ if (offscreen) {
+ apple_glx_diagnostic
+--
+1.9.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140524/5d844d0b/attachment-0001.html>
More information about the macports-changes
mailing list