aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-09-28 18:59:11 +0200
committerSven Gothel <[email protected]>2012-09-28 18:59:11 +0200
commit27fe889023c7366e264647e5dc25053f22df0956 (patch)
tree102cec7585b32bf0f741918757acba3dc38404ab /src/test/com
parent30d6d5e3c1ee7132c2b3cc722839528882e03053 (diff)
Adding Mesa Quirk 'NoSetSwapIntervalPostRetarget': SIGSEGV on setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel)
Analyzing 'TestGLContextDrawableSwitchNEWT' crash at setSwapInterval -> dri2SetSwapInterval after retargeting the context (new drawable association). Turns out Mesa's dri2SetSwapInterval may have a bug. +++ GLContext TRACE_SWITCH: Add drawable handle to debug/trace output.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java
index 4c1130498..496be3d93 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java
@@ -124,8 +124,8 @@ public class TestGLContextDrawableSwitchNEWT extends UITestCase {
public void testSwitch2WindowSingleContext() throws InterruptedException {
final QuitAdapter quitAdapter = new QuitAdapter();
- GLAutoDrawable glad1 = createGLAutoDrawable(caps, 64, 64, width, height, quitAdapter); // no GLContext!
- GLAutoDrawable glad2 = createGLAutoDrawable(caps, 2*64+width, 64, width+100, height+100, quitAdapter); // no GLContext!
+ GLAutoDrawable glad1 = createGLAutoDrawable(caps, 64, 64, width, height, quitAdapter);
+ GLAutoDrawable glad2 = createGLAutoDrawable(caps, 2*64+width, 64, width+100, height+100, quitAdapter);
// create single context using glad1 and assign it to glad1,
// after destroying the prev. context!
@@ -159,15 +159,22 @@ public class TestGLContextDrawableSwitchNEWT extends UITestCase {
System.err.println(s+" - switch - START "+ ( t1 - t0 ));
animator.pause();
+ // switch context _and_ the demo synchronously
if(0 == s%2) {
- glad1.addGLEventListener(0, glad2.removeGLEventListener(0));
+ final GLEventListener demo = glad2.removeGLEventListener(0);
GLContext ctx1 = glad1.setContext(glad2.getContext());
glad2.setContext(ctx1);
+ glad1.addGLEventListener(0, demo);
} else {
- glad2.addGLEventListener(0, glad1.removeGLEventListener(0));
+ final GLEventListener demo = glad1.removeGLEventListener(0);
GLContext ctx2 = glad2.setContext(glad1.getContext());
glad1.setContext(ctx2);
+ glad2.addGLEventListener(0, demo);
}
+ System.err.println(s+" - switch - display-1");
+ glad1.display();
+ System.err.println(s+" - switch - display-2");
+ glad2.display();
System.err.println(s+" - switch - END "+ ( t1 - t0 ));
@@ -218,13 +225,16 @@ public class TestGLContextDrawableSwitchNEWT extends UITestCase {
System.err.println(s+" - switch - START "+ ( t1 - t0 ));
animator.pause();
+ // switch context _and_ the demo synchronously
if(0 == s%2) {
- glWindow1.addGLEventListener(0, glWindow2.removeGLEventListener(0));
+ final GLEventListener demo = glWindow2.removeGLEventListener(0);
GLContext ctx1 = glWindow1.setContext(glWindow2.getContext());
+ glWindow1.addGLEventListener(0, demo);
glWindow2.setContext(ctx1);
} else {
- glWindow2.addGLEventListener(0, glWindow1.removeGLEventListener(0));
+ final GLEventListener demo = glWindow1.removeGLEventListener(0);
GLContext ctx2 = glWindow2.setContext(glWindow1.getContext());
+ glWindow2.addGLEventListener(0, demo);
glWindow1.setContext(ctx2);
}