Bug 11041 - Unable to render GL in a pixmap
Summary: Unable to render GL in a pixmap
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.1 (2006.05)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 01:54 UTC by Richard Naveos
Modified: 2007-05-29 13:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Richard Naveos 2007-05-23 01:54:51 UTC
Im so disapointed...
I first used Qt to render an OpenGl scene into a pixmap. It was very effective till I tried this in any of the following mainboards Intel D865GBF, Intel D915GEV, Intel D965OT using integrated GPU.

With Ubuntu 6.10 Edgy (X11 version 7.1). Standard installation.

The way to go:

1) Create a new context
cx = glXCreateContext( disp, (XVisualInfo *)vi, None, direct );

2) Create a GLXPixmap
gpm = glXCreateGLXPixmap( disp, (XVisualInfo *)vi, d->paintDevice->handle() );

3) Make it current
ok = glXMakeCurrent( d->paintDevice->x11Display(), (GLXPixmap)gpm, (GLXContext)cx );

4) No need to go further, I got a:
X Error: GLXBadContext 155
Major opcode: 143
Minor opcode: 5
Resource id: 0x2600017


Here is my glxinfo :
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x23 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x24 24 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x25 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x26 24 tc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x27 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x28 24 tc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x29 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x2a 24 tc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x2b 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x2c 24 dc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x2d 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x2e 24 dc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x2f 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x30 24 dc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x31 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x32 24 dc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow


For displaying I use the 0x25 visual and the 0x26 for rendering in a pixmap (same caracteristics with no doublebuffering).

So that, I set all the required settings just before creating the new context :
int res;
glXGetConfig( disp, (XVisualInfo*)vi, GLX_LEVEL, &res );
glFormat.setPlane( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_DOUBLEBUFFER, &res );
glFormat.setDoubleBuffer( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_DEPTH_SIZE, &res );
glFormat.setDepth( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_RGBA, &res );
glFormat.setRgba( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_ALPHA_SIZE, &res );
glFormat.setAlpha( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_ACCUM_RED_SIZE, &res );
glFormat.setAccum( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_STENCIL_SIZE, &res );
glFormat.setStencil( res );
glXGetConfig( disp, (XVisualInfo*)vi, GLX_STEREO, &res );
glFormat.setStereo( res );

Bool direct = format().directRendering() ? True : False;

I dont know... It looks correct, but... Any idea ?

As soon as I used the i810 driver I get the X error. Thus I logicaly think that it may be a bug here... Any feedbacks ?

Thank you for reading. I hope I posted this in the right place.

Richard
Comment 1 Eric Anholt 2007-05-29 13:37:03 UTC
Rendering to pixmaps is not supported by most DRI drivers -- likely, you didn't have DRI being used by your previous configuration.  It is up to applications to behave appropriately when a GLXPixmap cannot be created.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.