Page flipping not working as expected for compositing - engineering resource available to help fix it
Hello,
We're using Intel GPUs and Linux in our digital signage players, and hitting problems with getting OpenGL compositing to be tear-free. My understanding is that we need to be fairly close to the bleeding edge to get this working, and that the Fedora 12 packages aren't good enough.
I've therefore built a kernel and X stack from git, using the following components on top of a Fedora 12 installation, but I'm not getting the behaviour I'd expect:
* drm-intel-next kernel fromgit://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git branch drm- intel-next
as of e15831656778d032f3c7655949f8cc3997f2b04a
* util-macros-1.7.0 from the tarball at
http://ftp.x.org/pub/individual/util/util-macros-1.7.0.tar.bz2
* dri2proto fromgit://anongit.freedesktop.org/xorg/proto/dri2proto branch master as of c34ce137fdb21fc9a52bb8d5a0c25e3c5d79e687
* libdrm fromgit://anongit.freedesktop.org/mesa/drm branch master as of 6293152eb065016a2e5e4fcd047c2db5c2fb0f36
* mesa fromgit://anongit.freedesktop.org/mesa/mesa branch master as of f58d780b08a7059b82707291ad163cf6590134df
* xserver fromgit://anongit.freedesktop.org/xorg/xserver branch master as of 72758287f79a4f1aa8fa388f20947042e3e14693
* xf86-video-intel fromgit://anongit.freedesktop.org/xorg/driver/xf86-video-intel branch master as of 8562b7bc6740eef2602af76b8685388efd2d4d37
The kernel appears to induce out of range signals on my display, which is one bug - am I using the correct kernel tree here? I can, however, test the userspace stack against the F12 kernel, which appears to have enough pageflipping support to tell me that I'm on the right lines.
When I run my test program in direct rendering mode, I see a steady 60 fps; unfortunately, it appears that I can't use that for my compositing, as GLX_EXT_texture_from_pixmap doesn't function when I'm direct rendering (the resulting textures have no contents, so my compositing code draws white rectangles).
I've attached my test program (it's based on our C++ OpenGL compositor, but cut down to just test OpenGL pageflipping) as performance.c, and my test X stack's Xorg.0.log after one run of "performance -indirect" (which ran for 573 frames). I'm using a 32-bit PAE kernel - I can add information as required, and I'm happy to run tests or experiments for people.
I therefore have two questions:
1) Am I using the right kernel tree for page flipping? If not, what should I use? I'm quite git-happy, so if the answer is "this tree with these bits merged in and these patches on top", that's fine.
2) How should I go about fixing compositing? Should I fix indirect rendering to use pageflipping (and if so, where do I start looking for the code that's getting it wrong), or should I make TFP work when direct rendering (and again, where should I start looking)?
I have a mild personal preference for making TFP work when direct rendering - but this is because perf on my test program suggests that I gain from using vertex buffers objects (it appears that i965_dri.so implements glDrawArrays with a temporary VBO if I'm not using VBOs), and AIGLX doesn't support VBOs.
Our management sees this as a high priority, so both myself and my colleagues are able to drop what we're doing to work on this during office hours (10am to 6pm BST); we have C coding experience, and have contributed patches before, so we're happy to dive into the code and debug if that's what's needed - some idea of where to start looking would be really helpful.
Any advice will be gratefully received.
/* I've been compiling this with:
gcc -Wall -Werror -g -Os performance.c -lX11 -lGL -lGLU -lXcomposite -lglut -lGLEW -o performance
*/
#include <stdlib.h>
#include <stdio.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glxew.h>
#include <sys/time.h>
/* Remove the #undef if you wish to use VBOs - these don't work
for indirect rendering, as the xserver only exposes OpenGL 1.4, not 1.5
*/
#define USE_VBO 1
#undef USE_VBO
static const GLfloat m_vertexes[] = { 0.0f, 1.0f,
0.0f, 0.0f,
1.0f, 1.0f,
1.0f, 0.0f };
static const GLfloat m_texcoords[] = { 0.0f, 1.0f,
0.0f, 0.0f,
1.0f, 1.0f,
1.0f, 0.0f };#ifdef USE_VBO
static const size_t vertex = 0;
static const size_t texcoord = 1;
static GLuint m_buffers[2];
#endif
static GLuint m_textures[2];
static double start_time;
static unsigned frames = 0;
#ifdef USE_VBO
static void setupBuffers( void )
{
glGenBuffers( 2, m_buffers );
glBindBuffer( GL_ARRAY_BUFFER, m_buffers[vertex] );
glBufferData( GL_ARRAY_BUFFER, sizeof( GLfloat ) * 8, m_vertexes, GL_STATIC_DRAW );
glVertexPointer( 2, GL_FLOAT, sizeof(GLfloat) * 2, 0 );
glBindBuffer( GL_ARRAY_BUFFER, m_buffers[texcoord] );
glBufferData( GL_ARRAY_BUFFER, sizeof( GLfloat ) * 8, m_texcoords, GL_STATIC_DRAW );
glTexCoordPointer( 2, GL_FLOAT, sizeof(GLfloat) * 2, 0 );
}#endif
static void setupTextures( void )
{
glGenTextures( 2, m_textures );
int texno;
for( texno = 0; texno < 2; ++texno )
{
GLubyte data[ 256 * 256 * 4];
size_t i;
for( i = 0; i < 256 * 256 * 4; ++i )
{
if( i % 4 == texno )
{
data[i] = 0;
}
else
{
data[i] = -1;
}
}
glBindTexture( GL_TEXTURE_2D, m_textures[texno] );
glPixelTransferf( GL_ALPHA_BIAS, 1.0 );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB,
256, 256, 0,
GL_BGRA,
GL_UNSIGNED_BYTE, data);
glPixelTransferf( GL_ALPHA_BIAS, 0.0 );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
}
}static double timeOfDay()
{
struct timeval t;
gettimeofday( &t, NULL );
return ((double)(t.tv_sec) + (double)( t.tv_usec )/1000000.0);
}static void renderScene( void )
{
static int texno = 0;
static double last_frame_time = 0;
double current_frame_time;
double frame_time;
glColor4f( 1.0, 1.0, 1.0, 1.0 );
glBindTexture( GL_TEXTURE_2D, m_textures[texno] );#ifdef USE_VBO
glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );
#else
glVertexPointer( 2, GL_FLOAT, sizeof(GLfloat) * 2, m_vertexes );
glTexCoordPointer( 2, GL_FLOAT, sizeof(GLfloat) * 2, m_texcoords );
glDrawArrays( GL_TRIANGLE_STRIP, 0, 4 );#endif
glutSwapBuffers();
current_frame_time = timeOfDay();
texno = (texno + 1) % 2;
++frames;
if( (frames % 60) == 0 )
{
double now = timeOfDay();
printf( "Last 60 frames rate %f fps\n", 60 / (now - start_time) );
start_time = now;
}
frame_time = current_frame_time - last_frame_time;
if( frame_time * 60.0 < 0.9 )
{
printf( "Frames too fast at frame %d\n", frames );
printf( "%lf frames per second\n" , 1.0 / frame_time );
}
if( frame_time * 60.0 > 1.1 )
{
printf( "Frames too slow at frame %d\n", frames );
printf( "%lf frames per second\n" , 1.0 / frame_time );
}
last_frame_time = current_frame_time;
}int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 1024, 768 );
glutCreateWindow( "3D performance test" );
glutFullScreen();
glewExperimental = GL_TRUE;
GLenum err = glewInit();
if( err != GLEW_OK )
{
fprintf( stderr, "GLEW init: %s\n", glewGetErrorString( err ) );
exit(1);
}
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
/* left, right, bottom, top - gets 0,0 at top, left */
gluOrtho2D( 0, 1, 1, 0 );
glutDisplayFunc( renderScene );
glutIdleFunc( renderScene );
glEnable( GL_TEXTURE_2D );
glEnable( GL_BLEND );
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
setupTextures();
#ifdef USE_VBO
setupBuffers();
#endif
if( glXSwapIntervalSGI( 1 ) != 0 )
{
fprintf( stderr, "Could not set swap interval\n" );
}
start_time = timeOfDay();
glutMainLoop();
return 0;
}
[ 9284.903]
X.Org X Server 1.8.99
Release Date: unreleased
[ 9284.904] X Protocol Version 11, Revision 0
[ 9284.904] Build Operating System: Linux 2.6.32.11-99.fc12.x86_64 i686
[ 9284.904] Current Operating System: Linux ntb9191.office.onelan.co.uk 2.6.32.11-99.fc12.i686.PAE #1 SMP Mon Apr 5 16:15:03 EDT 2010 i686
[ 9284.904] Kernel command line: ro root=/dev/NTBgroup/System2 quiet pci=nommconf
[ 9284.904] Build Date: 06 May 2010 06:32:43PM
[ 9284.904]
[ 9284.904] Current version of pixman: 0.16.6
[ 9284.904] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 9284.904] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 9284.904] (==) Log file: "/usr/local/x11test/var/log/Xorg.0.log", Time: Fri May 7 14:06:30 2010
[ 9284.904] (II) Loader magic: 0x81e3ea0
[ 9284.904] (II) Module ABI versions:
[ 9284.904] X.Org ANSI C Emulation: 0.4
[ 9284.904] X.Org Video Driver: 8.0
[ 9284.904] X.Org XInput driver : 10.0
[ 9284.904] X.Org Server Extension : 4.0
[ 9284.914] (--) PCI:*(0:0:2:0) 8086:2992:103c:2803 Intel Corporation 82Q963/Q965 Integrated Graphics Controller rev 2, Mem @ 0xf0400000/1048576, 0xe0000000/268435456, I/O @ 0x00001100/8, BIOS @ 0x????????/131072
[ 9284.914] (==) Using default built-in configuration (30 lines)
[ 9284.914] (==) --- Start of built-in configuration ---
[ 9284.914] Section "Device"
[ 9284.914] Identifier "Builtin Default intel Device 0"
[ 9284.914] Driver "intel"
[ 9284.914] EndSection
[ 9284.914] Section "Screen"
[ 9284.914] Identifier "Builtin Default intel Screen 0"
[ 9284.914] Device "Builtin Default intel Device 0"
[ 9284.915] EndSection
[ 9284.915] Section "Device"
[ 9284.915] Identifier "Builtin Default vesa Device 0"
[ 9284.915] Driver "vesa"
[ 9284.915] EndSection
[ 9284.915] Section "Screen"
[ 9284.915] Identifier "Builtin Default vesa Screen 0"
[ 9284.915] Device "Builtin Default vesa Device 0"
[ 9284.915] EndSection
[ 9284.915] Section "Device"
[ 9284.915] Identifier "Builtin Default fbdev Device 0"
[ 9284.915] Driver "fbdev"
[ 9284.915] EndSection
[ 9284.915] Section "Screen"
[ 9284.915] Identifier "Builtin Default fbdev Screen 0"
[ 9284.915] Device "Builtin Default fbdev Device 0"
[ 9284.915] EndSection
[ 9284.915] Section "ServerLayout"
[ 9284.915] Identifier "Builtin Default Layout"
[ 9284.915] Screen "Builtin Default intel Screen 0"
[ 9284.915] Screen "Builtin Default vesa Screen 0"
[ 9284.915] Screen "Builtin Default fbdev Screen 0"
[ 9284.915] EndSection
[ 9284.915] (==) --- End of built-in configuration ---
[ 9284.915] (==) ServerLayout "Builtin Default Layout"
[ 9284.915] (**) |-->Screen "Builtin Default intel Screen 0" (0)
[ 9284.915] (**) | |-->Monitor "<default monitor>"
[ 9284.915] (**) | |-->Device "Builtin Default intel Device 0"
[ 9284.915] (==) No monitor specified for screen "Builtin Default intel Screen 0".
Using a default monitor configuration.
[ 9284.915] (**) |-->Screen "Builtin Default vesa Screen 0" (1)
[ 9284.915] (**) | |-->Monitor "<default monitor>"
[ 9284.915] (**) | |-->Device "Builtin Default vesa Device 0"
[ 9284.915] (==) No monitor specified for screen "Builtin Default vesa Screen 0".
Using a default monitor configuration.
[ 9284.915] (**) |-->Screen "Builtin Default fbdev Screen 0" (2)
[ 9284.915] (**) | |-->Monitor "<default monitor>"
[ 9284.915] (**) | |-->Device "Builtin Default fbdev Device 0"
[ 9284.915] (==) No monitor specified for screen "Builtin Default fbdev Screen 0".
Using a default monitor configuration.
[ 9284.915] (==) Automatically adding devices
[ 9284.915] (==) Automatically enabling devices
[ 9284.915] (WW) The directory "/usr/share/fonts/X11/misc/" does not exist.
[ 9284.915] Entry deleted from font path.
[ 9284.915] (WW) The directory "/usr/share/fonts/X11/TTF/" does not exist.
[ 9284.915] Entry deleted from font path.
[ 9284.915] (WW) The directory "/usr/share/fonts/X11/OTF/" does not exist.
[ 9284.915] Entry deleted from font path.
[ 9284.916] (WW) The directory "/usr/share/fonts/X11/Type1/" does not exist.
[ 9284.916] Entry deleted from font path.
[ 9284.916] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 9284.916] Entry deleted from font path.
[ 9284.916] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 9284.916] Entry deleted from font path.
[ 9284.916] (==) FontPath set to:[ 9284.916] (++) ModulePath set to "/usr/local/x11test/lib/xorg/modules/,/usr/lib/xorg/modules/" [ 9284.916] (II) The server relies on HAL to provide the list of input devices. If no devices become available, reconfigure HAL or disable AutoAddDevices. [ 9284.916] (II) Open ACPI successful (/var/run/acpid.socket) [ 9284.916] (II) LoadModule: "extmod" [ 9284.916] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/libextmod.so [ 9284.916] (II) Module extmod: vendor="X.Org Foundation" [ 9284.916] compiled for 1.8.99, module version = 1.0.0 [ 9284.916] Module class: X.Org Server Extension [ 9284.916] ABI class: X.Org Server Extension, version 4.0 [ 9284.916] (II) Loading extension MIT-SCREEN-SAVER [ 9284.916] (II) Loading extension XFree86-VidModeExtension [ 9284.916] (II) Loading extension XFree86-DGA [ 9284.916] (II) Loading extension DPMS [ 9284.916] (II) Loading extension XVideo [ 9284.916] (II) Loading extension XVideo-MotionCompensation [ 9284.916] (II) Loading extension X-Resource [ 9284.916] (II) LoadModule: "dbe" [ 9284.916] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/libdbe.so [ 9284.916] (II) Module dbe: vendor="X.Org Foundation" [ 9284.916] compiled for 1.8.99, module version = 1.0.0 [ 9284.916] Module class: X.Org Server Extension [ 9284.916] ABI class: X.Org Server Extension, version 4.0 [ 9284.916] (II) Loading extension DOUBLE-BUFFER [ 9284.916] (II) LoadModule: "glx" [ 9284.917] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/libglx.so [ 9284.917] (II) Module glx: vendor="X.Org Foundation" [ 9284.917] compiled for 1.8.99, module version = 1.0.0 [ 9284.917] ABI class: X.Org Server Extension, version 4.0 [ 9284.917] (==) AIGLX enabled [ 9284.917] (II) Loading extension GLX [ 9284.917] (II) LoadModule: "record" [ 9284.917] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/librecord.so [ 9284.917] (II) Module record: vendor="X.Org Foundation" [ 9284.917] compiled for 1.8.99, module version = 1.13.0 [ 9284.917] Module class: X.Org Server Extension [ 9284.917] ABI class: X.Org Server Extension, version 4.0 [ 9284.917] (II) Loading extension RECORD [ 9284.917] (II) LoadModule: "dri" [ 9284.917] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/libdri.so [ 9284.917] (II) Module dri: vendor="X.Org Foundation" [ 9284.917] compiled for 1.8.99, module version = 1.0.0 [ 9284.917] ABI class: X.Org Server Extension, version 4.0 [ 9284.917] (II) Loading extension XFree86-DRI [ 9284.917] (II) LoadModule: "dri2" [ 9284.918] (II) Loading /usr/local/x11test/lib/xorg/modules/extensions/libdri2.so [ 9284.918] (II) Module dri2: vendor="X.Org Foundation" [ 9284.918] compiled for 1.8.99, module version = 1.2.0 [ 9284.918] ABI class: X.Org Server Extension, version 4.0 [ 9284.918] (II) Loading extension DRI2 [ 9284.918] (II) LoadModule: "intel" [ 9284.918] (II) Loading /usr/local/x11test/lib/xorg/modules/drivers/intel_drv.so [ 9284.918] (II) Module intel: vendor="X.Org Foundation" [ 9284.918] compiled for 1.8.99, module version = 2.11.0 [ 9284.918] Module class: X.Org Video Driver [ 9284.918] ABI class: X.Org Video Driver, version 8.0 [ 9284.918] (II) LoadModule: "vesa" [ 9284.919] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 9284.919] (II) Module vesa: vendor="X.Org Foundation" [ 9284.919] compiled for 1.7.1, module version = 2.3.0 [ 9284.919] Module class: X.Org Video Driver [ 9284.919] ABI class: X.Org Video Driver, version 6.0 [ 9284.919] (EE) module ABI major version (6) doesn't match the server's version (8) [ 9284.919] (II) UnloadModule: "vesa" [ 9284.919] (II) Unloading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 9284.919] (EE) Failed to load module "vesa" (module requirement mismatch, 0) [ 9284.919] (II) LoadModule: "fbdev" [ 9284.920] (WW) Warning, couldn't open module fbdev [ 9284.920] (II) UnloadModule: "fbdev" [ 9284.920] (EE) Failed to load module "fbdev" (module does not exist, 0) [ 9284.920] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810, i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45, 4 Series, G45/G43, Q45/Q43, G41, B43, Clarkdale, Arrandale [ 9284.920] (--) using VT number 7
[ 9285.030] (II) Primary Device is: PCI 00@00:02:0 [ 9285.032] drmOpenDevice: node name is /dev/dri/card0 [ 9285.032] drmOpenDevice: open result is 12, (OK) [ 9285.179] drmOpenByBusid: Searching for BusID pci:0000:00:02.0 [ 9285.179] drmOpenDevice: node name is /dev/dri/card0 [ 9285.179] drmOpenDevice: open result is 12, (OK) [ 9285.179] drmOpenByBusid: drmOpenMinor returns 12 [ 9285.179] drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0 [ 9285.179] (II) intel(0): Creating default Display subsection in Screen section "Builtin Default intel Screen 0" for depth/fbbpp 24/32 [ 9285.179] (==) intel(0): Depth 24, (--) framebuffer bpp 32 [ 9285.179] (==) intel(0): RGB weight 888 [ 9285.179] (==) intel(0): Default visual is TrueColor [ 9285.179] (II) intel(0): Integrated Graphics Chipset: Intel(R) 965Q [ 9285.179] (--) intel(0): Chipset: "965Q" [ 9285.179] (==) intel(0): video overlay key set to 0x101fe [ 9285.286] (II) intel(0): Output VGA1 has no monitor section [ 9285.393] (II) intel(0): EDID for output VGA1 [ 9285.393] (II) intel(0): Manufacturer: TEO Model: 6770 Serial#: 13585 [ 9285.393] (II) intel(0): Year: 2005 Week: 31 [ 9285.393] (II) intel(0): EDID Version: 1.3 [ 9285.393] (II) intel(0): Analog Display Input, Input Voltage Level: 0.700/0.700 V [ 9285.393] (II) intel(0): Sync: Separate CompositeSerration on. V.Sync Pulse req. if CompSync or SyncOnGreen [ 9285.393] (II) intel(0): Max Image Size [cm]: horiz.: 34 vert.: 27 [ 9285.393] (II) intel(0): Gamma: 2.20 [ 9285.393] (II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display [ 9285.393] (II) intel(0): First detailed timing is preferred mode [ 9285.393] (II) intel(0): redX: 0.652 redY: 0.333 greenX: 0.277 greenY: 0.629 [ 9285.393] (II) intel(0): blueX: 0.141 blueY: 0.054 whiteX: 0.310 whiteY: 0.330 [ 9285.393] (II) intel(0): Supported established timings: [ 9285.393] (II) intel(0): 720x400@70Hz [ 9285.393] (II) intel(0): 640x480@60Hz [ 9285.393] (II) intel(0): 640x480@67Hz [ 9285.393] (II) intel(0): 640x480@72Hz [ 9285.393] (II) intel(0): 640x480@75Hz [ 9285.393] (II) intel(0): 800x600@56Hz [ 9285.393] (II) intel(0): 800x600@60Hz [ 9285.393] (II) intel(0): 800x600@72Hz [ 9285.393] (II) intel(0): 800x600@75Hz [ 9285.393] (II) intel(0): 832x624@75Hz [ 9285.393] (II) intel(0): 1024x768@60Hz [ 9285.393] (II) intel(0): 1024x768@70Hz [ 9285.393] (II) intel(0): 1024x768@75Hz [ 9285.393] (II) intel(0): 1280x1024@75Hz [ 9285.393] (II) intel(0): Manufacturer's mask: 0 [ 9285.393] (II) intel(0): Supported standard timings: [ 9285.393] (II) intel(0): #0: hsize: 1152 vsize 864 refresh: 60 vid: 16497 [ 9285.393] (II) intel(0): #1: hsize: 1152 vsize 864 refresh: 70 vid: 19057 [ 9285.393] (II) intel(0): #2: hsize: 1152 vsize 864 refresh: 75 vid: 20337 [ 9285.393] (II) intel(0): #3: hsize: 1280 vsize 960 refresh: 60 vid: 16513 [ 9285.393] (II) intel(0): #4: hsize: 1280 vsize 960 refresh: 70 vid: 19073 [ 9285.394] (II) intel(0): #5: hsize: 1280 vsize 960 refresh: 75 vid: 20353 [ 9285.394] (II) intel(0): #6: hsize: 1280 vsize 1024 refresh: 60 vid: 32897 [ 9285.394] (II) intel(0): Supported detailed timing: [ 9285.394] (II) intel(0): clock: 108.0 MHz Image Size: 338 x 270 mm [ 9285.394] (II) intel(0): h_active: 1280 h_sync: 1328 h_sync_end 1440 h_blank_end 1688 h_border: 0 [ 9285.394] (II) intel(0): v_active: 1024 v_sync: 1025 v_sync_end 1028 v_blanking: 1066 v_border: 0 [ 9285.394] (II) intel(0): Ranges: V min: 49 V max: 75 Hz, H min: 24 H max: 80 kHz, PixClock max 140 MHz [ 9285.394] (II) intel(0): Monitor name: TECO TL766 [ 9285.394] (II) intel(0): Serial No: R75CP13585 [ 9285.394] (II) intel(0): EDID (in hex): [ 9285.394] (II) intel(0): 00ffffffffffff0050af706711350000 [ 9285.394] (II) intel(0): 1f0f01036d221b78ea1036a75547a124 [ 9285.394] (II) intel(0): 0d4f54bfef007140714a714f8140814a [ 9285.394] (II) intel(0): 814f81800101302a009851002a403070 [ 9285.394] (II) intel(0): 1300520e1100001e000000fd00314b18 [ 9285.394] (II) intel(0): 500e000a202020202020000000fc0054 [ 9285.394] (II) intel(0): 45434f20544c3736360a2020000000ff [ 9285.394] (II) intel(0): 00523735435031333538350a20200059 [ 9285.394] (II) intel(0): EDID vendor "TEO", prod id 26480 [ 9285.394] (II) intel(0): Using EDID range info for horizontal sync [ 9285.394] (II) intel(0): Using EDID range info for vertical refresh [ 9285.394] (II) intel(0): Printing DDC gathered Modelines: [ 9285.394] (II) intel(0): Modeline "1280x1024"x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz) [ 9285.394] (II) intel(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz) [ 9285.394] (II) intel(0): Modeline "800x600"x0.0 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz) [ 9285.394] (II) intel(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz) [ 9285.394] (II) intel(0): Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz) [ 9285.394] (II) intel(0): Modeline "640x480"x0.0 30.24 640 704 768 864 480 483 486 525 -hsync -vsync (35.0 kHz) [ 9285.394] (II) intel(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz) [ 9285.394] (II) intel(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz) [ 9285.394] (II) intel(0): Modeline "1280x1024"x0.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz) [ 9285.394] (II) intel(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz) [ 9285.394] (II) intel(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz) [ 9285.394] (II) intel(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x60.0 81.62 1152 1216 1336 1520 864 865 868 895 -hsync +vsync (53.7 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x70.0 96.77 1152 1224 1344 1536 864 865 868 900 -hsync +vsync (63.0 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x0.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x0.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x70.0 120.84 1280 1368 1504 1728 960 961 964 999 -hsync +vsync (69.9 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x75.0 129.86 1280 1368 1504 1728 960 961 964 1002 -hsync +vsync (75.2 kHz) [ 9285.394] (II) intel(0): Printing probed modes for output VGA1 [ 9285.394] (II) intel(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz) [ 9285.394] (II) intel(0): Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x75.0 129.94 1280 1368 1504 1728 960 961 964 1002 -hsync +vsync (75.2 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x70.0 120.90 1280 1368 1504 1728 960 961 964 999 -hsync +vsync (70.0 kHz) [ 9285.394] (II) intel(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x75.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x70.0 96.73 1152 1224 1344 1536 864 865 868 900 -hsync +vsync (63.0 kHz) [ 9285.394] (II) intel(0): Modeline "1152x864"x60.0 81.58 1152 1216 1336 1520 864 865 868 895 -hsync +vsync (53.7 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x75.1 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.1 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x70.1 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz) [ 9285.394] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz) [ 9285.394] (II) intel(0): Modeline "832x624"x74.6 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz) [ 9285.394] (II) intel(0): Modeline "800x600"x72.2 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz) [ 9285.395] (II) intel(0): Modeline "800x600"x75.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz) [ 9285.395] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz) [ 9285.395] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz) [ 9285.395] (II) intel(0): Modeline "640x480"x72.8 31.50 640 664 704 832 480 489 491 520 -hsync -vsync (37.9 kHz) [ 9285.395] (II) intel(0): Modeline "640x480"x75.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz) [ 9285.395] (II) intel(0): Modeline "640x480"x66.7 30.24 640 704 768 864 480 483 486 525 -hsync -vsync (35.0 kHz) [ 9285.395] (II) intel(0): Modeline "640x480"x60.0 25.20 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz) [ 9285.395] (II) intel(0): Modeline "720x400"x70.1 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz) [ 9285.395] (II) intel(0): Output VGA1 connected [ 9285.395] (II) intel(0): Using exact sizes for initial modes [ 9285.395] (II) intel(0): Output VGA1 using initial mode 1280x1024 [ 9285.395] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated. [ 9285.395] (II) intel(0): Kernel page flipping support detected, enabling [ 9285.395] (**) intel(0): Display dimensions: (340, 270) mm [ 9285.395] (**) intel(0): DPI set to (95, 96) [ 9285.395] (II) Loading sub module "fb" [ 9285.395] (II) LoadModule: "fb" [ 9285.395] (II) Loading /usr/local/x11test/lib/xorg/modules/libfb.so [ 9285.395] (II) Module fb: vendor="X.Org Foundation" [ 9285.395] compiled for 1.8.99, module version = 1.0.0 [ 9285.395] ABI class: X.Org ANSI C Emulation, version 0.4 [ 9285.395] (==) Depth 24 pixmap format is 32 bpp [ 9285.395] (II) intel(0): [DRI2] Setup complete [ 9285.395] (II) intel(0): [DRI2] DRI driver: i965 [ 9285.395] (**) intel(0): Tiling enabled [ 9285.395] (**) intel(0): SwapBuffers wait enabled [ 9285.396] (==) intel(0): VideoRam: 262144 KB [ 9285.396] (II) intel(0): Attempting memory allocation with tiled buffers. [ 9285.396] (II) intel(0): Tiled allocation successful. [ 9285.407] (II) UXA(0): Driver registered support for the following operations: [ 9285.407] (II) solid [ 9285.407] (II) copy [ 9285.407] (II) composite (RENDER acceleration) [ 9285.407] (II) put_image [ 9285.407] (==) intel(0): Backing store disabled [ 9285.407] (==) intel(0): Silken mouse enabled [ 9285.407] (II) intel(0): Initializing HW Cursor [ 9285.501] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message. [ 9285.501] (==) intel(0): DPMS enabled [ 9285.501] (II) intel(0): Set up textured video [ 9285.501] (II) intel(0): Set up overlay video [ 9285.501] (II) intel(0): direct rendering: DRI2 Enabled [ 9285.501] (--) RandR disabled [ 9285.501] (II) Initializing built-in extension Generic Event Extension [ 9285.501] (II) Initializing built-in extension SHAPE [ 9285.501] (II) Initializing built-in extension MIT-SHM [ 9285.501] (II) Initializing built-in extension XInputExtension [ 9285.501] (II) Initializing built-in extension XTEST [ 9285.501] (II) Initializing built-in extension BIG-REQUESTS [ 9285.501] (II) Initializing built-in extension SYNC [ 9285.501] (II) Initializing built-in extension XKEYBOARD [ 9285.501] (II) Initializing built-in extension XC-MISC [ 9285.501] (II) Initializing built-in extension XINERAMA [ 9285.501] (II) Initializing built-in extension XFIXES [ 9285.501] (II) Initializing built-in extension RENDER [ 9285.501] (II) Initializing built-in extension RANDR [ 9285.501] (II) Initializing built-in extension COMPOSITE [ 9285.501] (II) Initializing built-in extension DAMAGE [ 9285.512] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [ 9285.512] (II) AIGLX: enabled GLX_INTEL_swap_event [ 9285.512] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [ 9285.512] (II) AIGLX: enabled GLX_SGI_make_current_read [ 9285.512] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [ 9285.512] (II) AIGLX: Loaded and initialized /usr/local/x11test/lib/dri/i965_dri.so [ 9285.512] (II) GLX: Initialized DRI2 GL provider for screen 0 [ 9285.513] (II) intel(0): Setting screen physical size to 338 x 270 [ 9285.567] (II) config/hal: Adding input device AT Translated Set 2 keyboard [ 9285.567] (II) LoadModule: "evdev" [ 9285.568] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.575] (II) Module evdev: vendor="X.Org Foundation" [ 9285.575] compiled for 1.7.1, module version = 2.3.2 [ 9285.575] Module class: X.Org XInput Driver [ 9285.575] ABI class: X.Org XInput driver, version 7.0 [ 9285.575] (EE) module ABI major version (7) doesn't match the server's version (10) [ 9285.575] (II) UnloadModule: "evdev" [ 9285.575] (II) Unloading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.575] (EE) Failed to load module "evdev" (module requirement mismatch, 0) [ 9285.575] (EE) No input driver matching `evdev' [ 9285.575] (EE) config/hal: NewInputDeviceRequest failed (15) [ 9285.579] (II) config/hal: Adding input device HP WMI hotkeys [ 9285.579] (II) LoadModule: "evdev" [ 9285.580] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.580] (II) Module evdev: vendor="X.Org Foundation" [ 9285.580] compiled for 1.7.1, module version = 2.3.2 [ 9285.580] Module class: X.Org XInput Driver [ 9285.580] ABI class: X.Org XInput driver, version 7.0 [ 9285.580] (EE) module ABI major version (7) doesn't match the server's version (10) [ 9285.580] (II) UnloadModule: "evdev" [ 9285.580] (II) Unloading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.580] (EE) Failed to load module "evdev" (module requirement mismatch, 0) [ 9285.580] (EE) No input driver matching `evdev' [ 9285.580] (EE) config/hal: NewInputDeviceRequest failed (15) [ 9285.582] (II) config/hal: Adding input device Macintosh mouse button emulation [ 9285.582] (II) LoadModule: "evdev" [ 9285.583] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.583] (II) Module evdev: vendor="X.Org Foundation" [ 9285.583] compiled for 1.7.1, module version = 2.3.2 [ 9285.583] Module class: X.Org XInput Driver [ 9285.583] ABI class: X.Org XInput driver, version 7.0 [ 9285.583] (EE) module ABI major version (7) doesn't match the server's version (10) [ 9285.583] (II) UnloadModule: "evdev" [ 9285.583] (II) Unloading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.583] (EE) Failed to load module "evdev" (module requirement mismatch, 0) [ 9285.583] (EE) No input driver matching `evdev' [ 9285.583] (EE) config/hal: NewInputDeviceRequest failed (15) [ 9285.587] (II) config/hal: Adding input device Power Button [ 9285.587] (II) LoadModule: "evdev" [ 9285.588] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.588] (II) Module evdev: vendor="X.Org Foundation" [ 9285.588] compiled for 1.7.1, module version = 2.3.2 [ 9285.588] Module class: X.Org XInput Driver [ 9285.588] ABI class: X.Org XInput driver, version 7.0 [ 9285.588] (EE) module ABI major version (7) doesn't match the server's version (10) [ 9285.588] (II) UnloadModule: "evdev" [ 9285.588] (II) Unloading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.588] (EE) Failed to load module "evdev" (module requirement mismatch, 0) [ 9285.588] (EE) No input driver matching `evdev' [ 9285.588] (EE) config/hal: NewInputDeviceRequest failed (15) [ 9285.592] (II) config/hal: Adding input device Power Button [ 9285.592] (II) LoadModule: "evdev" [ 9285.593] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.593] (II) Module evdev: vendor="X.Org Foundation" [ 9285.593] compiled for 1.7.1, module version = 2.3.2 [ 9285.593] Module class: X.Org XInput Driver [ 9285.593] ABI class: X.Org XInput driver, version 7.0 [ 9285.593] (EE) module ABI major version (7) doesn't match the server's version (10) [ 9285.593] (II) UnloadModule: "evdev" [ 9285.593] (II) Unloading /usr/lib/xorg/modules/input/evdev_drv.so [ 9285.593] (EE) Failed to load module "evdev" (module requirement mismatch, 0) [ 9285.593] (EE) No input driver matching `evdev' [ 9285.593] (EE) config/hal: NewInputDeviceRequest failed (15) [ 9309.282] (II) Open ACPI successful (/var/run/acpid.socket) [ 9309.282] (II) APM registered successfully [ 9309.282] (II) intel(0): [DRI2] Setup complete [ 9309.282] (II) intel(0): [DRI2] DRI driver: i965 [ 9309.282] (**) intel(0): Tiling enabled [ 9309.282] (**) intel(0): SwapBuffers wait enabled [ 9309.282] (==) intel(0): VideoRam: 262144 KB [ 9309.282] (II) intel(0): Attempting memory allocation with tiled buffers. [ 9309.282] (II) intel(0): Tiled allocation successful. [ 9309.293] (II) UXA(0): Driver registered support for the following operations: [ 9309.293] (II) solid [ 9309.293] (II) copy [ 9309.293] (II) composite (RENDER acceleration) [ 9309.293] (II) put_image [ 9309.293] (II) intel(0): Initializing HW Cursor [ 9309.324] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message. [ 9309.324] (==) intel(0): DPMS enabled [ 9309.324] (II) intel(0): Set up textured video [ 9309.324] (II) intel(0): Set up overlay video [ 9309.324] (II) intel(0): direct rendering: DRI2 Enabled [ 9309.324] (--) RandR disabled [ 9309.335] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [ 9309.335] (II) AIGLX: enabled GLX_INTEL_swap_event [ 9309.335] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [ 9309.335] (II) AIGLX: enabled GLX_SGI_make_current_read [ 9309.335] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [ 9309.335] (II) AIGLX: Loaded and initialized /usr/local/x11test/lib/dri/i965_dri.so [ 9309.335] (II) GLX: Initialized DRI2 GL provider for screen 0 [ 9309.335] (II) intel(0): Setting screen physical size to 338 x 270
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Simon Farnsworth
I've attached my test program (it's based on our C++ OpenGL compositor, but cut down to just test OpenGL pageflipping) as
performance.c, and my test X stack's Xorg.0.log after one run of "performance -indirect" (which ran for 573 frames). I'm using a 32-bit PAE kernel - I can add information as required, and I'm happy to run tests or experiments for people.2) How should I go about fixing compositing? Should I fix indirect rendering to use pageflipping (and if so, where do I start looking for the code that's getting it wrong), or should I make TFP work when direct rendering (and again, where should I start looking)?
Getting further. I've been able to confirm (by putting lots of calls to xf86DrvMsg in the intel driver) that page flipping is happening for both direct and indirect rendering.
However, when I'm direct rendering, glXSwapBuffers stalls until the swap is complete (as I'd expect). When I'm indirect rendering, it doesn't - I get resumed immediately, which causes my excessive frame rate.
Is this the expected behaviour when indirect rendering? If so, I'll dive back into the stack and see if I can work out why TFP and direct rendering don't interact nicely. If not, roughly where should I look to fix it?
Signature · 4 lines
Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/
Quoted 8 lines · Simon Farnsworth
Quoted 7 lines · Simon Farnsworth
I've attached my test program (it's based on our C++ OpenGL compositor, but cut down to just test OpenGL pageflipping) as
performance.c, and my test X stack's Xorg.0.log after one run of "performance -indirect" (which ran for 573 frames). I'm using a 32-bit PAE kernel - I can add information as required, and I'm happy to run tests or experiments for people.
Quoted 8 lines
Quoted 4 lines
2) How should I go about fixing compositing? Should I fix indirect rendering to use pageflipping (and if so, where do I start looking for the code that's getting it wrong), or should I make TFP work when direct rendering (and again, where should I start looking)?
Is this the expected behaviour when indirect rendering? If so, I'll dive back into the stack and see if I can work out why TFP and direct rendering don't interact nicely. If not, roughly where should I look to fix it?
I've found why direct rendering and TFP don't interact nicely, and it's a client side error.
Briefly, my compositor was being started as our signage user, who does not have access to /dev/dri/card0, so was falling back to swrast. When you're using swrast, TFP only appears to work for pixmaps you create, not for compositing pixmaps.
Sorry for the noise,
Signature · 4 lines
Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/
Quoted 18 lines · Simon Farnsworth
Quoted 8 lines · Simon Farnsworth
Quoted 7 lines · Simon Farnsworth
I've attached my test program (it's based on our C++ OpenGL compositor, but cut down to just test OpenGL pageflipping) as
performance.c, and my test X stack's Xorg.0.log after one run of "performance -indirect" (which ran for 573 frames). I'm using a 32-bit PAE kernel - I can add information as required, and I'm happy to run tests or experiments for people.Quoted 8 lines
Quoted 4 lines
2) How should I go about fixing compositing? Should I fix indirect rendering to use pageflipping (and if so, where do I start looking for the code that's getting it wrong), or should I make TFP work when direct rendering (and again, where should I start looking)?
Is this the expected behaviour when indirect rendering? If so, I'll dive back into the stack and see if I can work out why TFP and direct rendering don't interact nicely. If not, roughly where should I look to fix it?
Quoted 7 lines
I've found why direct rendering and TFP don't interact nicely, and it's a client side error.
Briefly, my compositor was being started as our signage user, who does not have access to
/dev/dri/card0, so was falling back to swrast. When you're using swrast, TFP only appears to work for pixmaps you create, not for compositing pixmaps.
Your program still fails for me running as an ordinary user (with, I'm pretty sure, all necessary rights) when compositing is enabled.
--Andy
Quoted 21 lines · On Mon, 10 May 2010 17:59:16 +0100 Simon Farnsworth…
Quoted 8 lines · Simon Farnsworth
Quoted 7 lines · Simon Farnsworth
I've attached my test program (it's based on our C++ OpenGL compositor, but cut down to just test OpenGL pageflipping) as
performance.c, and my test X stack's Xorg.0.log after one run of "performance -indirect" (which ran for 573 frames). I'm using a 32-bit PAE kernel - I can add information as required, and I'm happy to run tests or experiments for people.Quoted 8 lines
Quoted 4 lines
2) How should I go about fixing compositing? Should I fix indirect rendering to use pageflipping (and if so, where do I start looking for the code that's getting it wrong), or should I make TFP work when direct rendering (and again, where should I start looking)?
Is this the expected behaviour when indirect rendering? If so, I'll dive back into the stack and see if I can work out why TFP and direct rendering don't interact nicely. If not, roughly where should I look to fix it?
I've found why direct rendering and TFP don't interact nicely, and it's a client side error.
Quoted 6 lines
Briefly, my compositor was being started as our signage user, who does not have access to
/dev/dri/card0, so was falling back to swrast. When you're using swrast, TFP only appears to work for pixmaps you create, not for compositing pixmaps.Sorry for the noise,
What about the indirect bug? Did that also go away when you fixed the perms issue? If not, that sounds like a serious issue, in indirect mode the swap interval should still be honored I think...
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 3 lines · Jesse Barnes
What about the indirect bug? Did that also go away when you fixed the perms issue? If not, that sounds like a serious issue, in indirect mode the swap interval should still be honored I think...
In indirect mode, the swap interval was being honoured by the page flipping code, but SwapBuffers wasn't blocking; instead, I appeared to be able to continue to draw to the backbuffer after issuing SwapBuffers in my application.
In direct mode, SwapBuffers behaved as I'd expect - I blocked as soon as I tried to draw, until the swap had completed.
Guessing wildly, when I SwapBuffers in a direct context, I ask the kernel to stall me as soon as I draw to the back buffer (which is presumably still in use as the real front buffer). When I'm in an indirect context, it's the X server process that calls the kernel, which can't block, because that would stop it servicing other clients, and it's not blocking me until it discovers asynchronously that the kernel has pageflipped.
Signature · 4 lines
Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/