Hi, In fact, this bugged me a long time and now I'd finally like to have a solution: https://bugs.freedesktop.org/show_bug.cgi?id=8160 The issue is: compiz has now some fallback code to indirect rendering if direct doesn't work. But that's completely useless, because it'll fail some lines later, exactly here: glxExtensions = glXQueryExtensionsString (dpy, screenNum); if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap")) The issue is, glXQueryExtensionsString won't return texture_from_pixmap on AIGLX if LIBGL_ALWAYS_INDIRECT isn't set. Now, the hacky solution would be to do something like the patch I attached to the bug 8160. The proper solution would probably to add an optional parameter to glXQueryExtensionsString to force indirect rendering. Shouldn't be that hard, some fiddling around with stdarg/va_list. As this probably results in a small API-change, I wanted to have the opinion of the mesa-folks how to solve this best. -- Hanno B?ck Blog: http://www.hboeck.de/ GPG: 3DBD3B20 Jabber: jabber@hboeck.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freedesktop.org/archives/compiz/attachments/20070412/d9939333/attachment.pgp
On Wednesday 11 April 2007 04:02 pm, Hanno B?ck wrote:> Hi, > > In fact, this bugged me a long time and now I'd finally like to > have a solution: > https://bugs.freedesktop.org/show_bug.cgi?id=8160 > > The issue is: > compiz has now some fallback code to indirect rendering if direct > doesn't work. But that's completely useless, because it'll fail > some lines later, exactly here: > glxExtensions = glXQueryExtensionsString (dpy, > screenNum); if (!strstr (glxExtensions, > "GLX_EXT_texture_from_pixmap")) > > The issue is, glXQueryExtensionsString won't return > texture_from_pixmap on AIGLX if LIBGL_ALWAYS_INDIRECT isn't set.> Now, the hacky solution would be to do something like the patch I > attached to the bug 8160. > > The proper solution would probably to add an optional parameter > to glXQueryExtensionsString to force indirect rendering. > Shouldn't be that hard, some fiddling around with stdarg/va_list. > As this probably results in a small API-change, I wanted to have > the opinion of the mesa-folks how to solve this best.This is close to a proper solution. The problem here is, and always has been, that there is no notion of an indirect-rendering or direct-rendering only extension in GLX. GLX extensions are not specific to a context. The result of glXQueryExtensionsString() refers to extensions available on the display connection, not the current context according to the GLX spec. I believe AIGLX reports TFP in the server extension string and not the client extension string. This implies the client has no support for the extension, regardless of whether the client is being used for direct or indirect rendering. However, there is currently no mechanism for the client to report that it supports the protocol but not the direct rendering implementation. I think the correct solution would be extendeding GLX to support the notion of per-context GLX extension strings, and a mechanism could then be added to query the GLX extensions supported by the current context. Or, just do something hacky in the short term and assume all drivers will eventually support both indirect and direct rendering TFP in the near future. This one-off, hopefully temporary problem may not be enough to justify a whole new extension-querying API. Thanks, -James Jones nvpublic
Michel Dänzer
2007-Apr-12 06:05 UTC
[compiz] [Mesa3d-dev] The direct/indirect rendering stuff and compiz
On Thu, 2007-04-12 at 01:02 +0200, Hanno B?ck wrote:> > The proper solution would probably to add an optional parameter to > glXQueryExtensionsString to force indirect rendering. Shouldn't be that hard, > some fiddling around with stdarg/va_list. As this probably results in a small > API-change, I wanted to have the opinion of the mesa-folks how to solve this > best.A more natural solution might be for it to take the current context into account when appropriate. That would still require the app to make the context current before querying the extensions though. -- Earthling Michel D?nzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer
Brian Paul
2007-Apr-12 16:05 UTC
[compiz] [Mesa3d-dev] The direct/indirect rendering stuff and compiz
Hanno B?ck wrote:> Hi, > > In fact, this bugged me a long time and now I'd finally like to have a > solution: > https://bugs.freedesktop.org/show_bug.cgi?id=8160 > > The issue is: > compiz has now some fallback code to indirect rendering if direct doesn't > work. But that's completely useless, because it'll fail some lines later, > exactly here: > glxExtensions = glXQueryExtensionsString (dpy, screenNum); > if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap")) > > The issue is, glXQueryExtensionsString won't return texture_from_pixmap on > AIGLX if LIBGL_ALWAYS_INDIRECT isn't set. > > Now, the hacky solution would be to do something like the patch I attached to > the bug 8160. > > The proper solution would probably to add an optional parameter to > glXQueryExtensionsString to force indirect rendering. Shouldn't be that hard, > some fiddling around with stdarg/va_list. As this probably results in a small > API-change, I wanted to have the opinion of the mesa-folks how to solve this > best.We can't just add new parameters to existing GLX API functions like glXQueryExtensionsString(). It would be better to create a new function/GLX extension. -Brian
Maybe Matching Threads
- LIBGL_ALWAYS_INDIRECT=1 patch fix - any reason why it's not included?
- Compiz .36 => No Borders
- Invalid memory access / read stack overflow when reading config with zero bytes
- Invalid memory access / read stack overflow when reading config with zero bytes
- Bundle tfp-detection with correct defaults for aiglx