Bug 26581 - i965: no fbconfigs for pbuffers
Summary: i965: no fbconfigs for pbuffers
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) All
: low enhancement
Assignee: Kristian Høgsberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-15 11:28 UTC by Thomas Jones
Modified: 2010-04-15 08:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
glxinfo output (16.83 KB, text/plain)
2010-02-15 11:28 UTC, Thomas Jones
Details
Set pbuffer bit for fbconfigs (4.73 KB, patch)
2010-02-26 09:23 UTC, Kristian Høgsberg
Details | Splinter Review

Description Thomas Jones 2010-02-15 11:28:19 UTC
Created attachment 33320 [details]
glxinfo output

doing this gets no fbconfigs back:

static const int attrib_list[] = {
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
None
};
fbconfigs = glXChooseFBConfig(dpy, scrnum, attrib_list, &numFBConfigs);

This seems to be the cause of #24093
Comment 1 Eric Anholt 2010-02-16 15:35:04 UTC
The best result here would be for firefox to get fixed to use FBOs.  Until then, this will just be a request for enhancement for the driver to support an API that's been obsolete for 5 years.
Comment 2 Thomas Jones 2010-02-20 08:21:15 UTC
(In reply to comment #1)
> The best result here would be for firefox to get fixed to use FBOs.  Until
> then, this will just be a request for enhancement for the driver to support an
> API that's been obsolete for 5 years.
> 

I looked at the FF code, I expect the reason they are using pbuffers is because they don't have an X Window to tie the GL context to since webGL content might have other stuff on top of it...

Also they need one GL context per canvas element so they can't just use one shared GL context for everything...

I filed a mozilla bug for this as well: https://bugzilla.mozilla.org/show_bug.cgi?id=536119 

Also if they don't work shouldn't the GLX_SGIX_pbuffer extension not be listed?
Comment 3 Ian Romanick 2010-02-21 20:07:20 UTC
(In reply to comment #2)
> Also if they don't work shouldn't the GLX_SGIX_pbuffer extension not be listed?

Unfortunately, GLX_SGIX_pbuffer is required for GLX 1.3.  We support all of the useful bits of GLX 1.3, and we correctly support the mechanism to ask for a pbuffer visual.  Sometimes when you ask for something the answer is no.  Several GL and GLX extensions, such as this one and GLX_SGIS_multisample, intentionally allow this sort of implementation.

That said, since we can do accelerated rendering to pixmaps, adding pbuffers would be a fairly trivial enhancement.  I'm reassigning to Kristian because he once described to me how he thought that should be done.
Comment 4 Kristian Høgsberg 2010-02-26 09:23:22 UTC
Created attachment 33592 [details] [review]
Set pbuffer bit for fbconfigs

Pbuffers are already implemented in the X server, but we've never actually enabled the bits in the fbconfigs.  The attached patch will set the pbuffer bits in the fbconfigs when we're loading a dri2 driver, which should be all that's needed.  This does enable an untested codepath (I'm pretty sure I tested it when I wrote the code...).  We can try to add this after the 1.8 xserver goes out.
Comment 5 Kristian Høgsberg 2010-04-15 08:47:13 UTC
This is now committed to git master and will in be xserver 1.9.


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.