From eb7ca05a602bfd3decf545e2807b7bfaf5a09a1e Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Tue, 2 Oct 2012 07:33:17 +0200
Subject: GLRendererQuirks.NoDoubleBufferedPBuffer: Set if ( mesa || gallium )
&& hwAccel
---
src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java | 10 +++++++++-
src/jogl/classes/jogamp/opengl/GLContextImpl.java | 9 +++++----
2 files changed, 14 insertions(+), 5 deletions(-)
(limited to 'src/jogl')
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 1bbe22548..82799bf67 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -36,7 +36,15 @@ package com.jogamp.opengl;
*
*/
public class GLRendererQuirks {
- /** Crashes XServer when using double buffered PBuffer with 'Mesa DRI Intel(R) Sandybridge Desktop' & 'Mesa DRI Intel(R) Ivybridge Mobile - 3.0 Mesa 8.0.4' */
+ /**
+ * Crashes XServer when using double buffered PBuffer with:
+ *
+ * - Mesa DRI Intel(R) Sandybridge Desktop
+ * - Mesa DRI Intel(R) Ivybridge Mobile - 3.0 Mesa 8.0.4
+ * - Gallium 0.4 on AMD CYPRESS
+ *
+ * For now, it is safe to disable it w/ hw-acceleration.
+ */
public static final int NoDoubleBufferedPBuffer = 0;
/** On Windows no double buffered bitmaps are guaranteed to be available. */
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index d7f61681f..249dc9c62 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1261,7 +1261,7 @@ public abstract class GLContextImpl extends GLContext {
//
setContextVersion(major, minor, ctxProfileBits, true);
- setRendererQuirks();
+ setRendererQuirks( 0 == ( ctxProfileBits & GLContext.CTX_IMPL_ACCEL_SOFT ) );
setDefaultSwapInterval();
@@ -1270,7 +1270,7 @@ public abstract class GLContextImpl extends GLContext {
}
}
- private final void setRendererQuirks() {
+ private final void setRendererQuirks(boolean hwAccel) {
int[] quirks = new int[GLRendererQuirks.COUNT];
int i = 0;
@@ -1297,7 +1297,7 @@ public abstract class GLContextImpl extends GLContext {
}
quirks[i++] = quirk;
}
- if( glRendererLowerCase.contains("mesa") ) {
+ if( glRendererLowerCase.contains("mesa") || glRendererLowerCase.contains("gallium") ) {
{
final int quirk = GLRendererQuirks.NoSetSwapIntervalPostRetarget;
if(DEBUG) {
@@ -1305,7 +1305,8 @@ public abstract class GLContextImpl extends GLContext {
}
quirks[i++] = quirk;
}
- if( glRendererLowerCase.contains("intel(r)") ) {
+ if( hwAccel /* glRendererLowerCase.contains("intel(r)") || glRendererLowerCase.contains("amd") */ )
+ {
final int quirk = GLRendererQuirks.NoDoubleBufferedPBuffer;
if(DEBUG) {
System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer);
--
cgit v1.2.3