Last Comment Bug 486277 - [c3d] Canvas 3D doesn't work on Linux with ATI fglrx drivers
: [c3d] Canvas 3D doesn't work on Linux with ATI fglrx drivers
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: x86 Linux
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2009-04-01 01:51 PDT by Ilmari Heikkinen
Modified: 2011-06-12 02:48 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Workarounds for Linux ATI fglrx crashes and bugs (9.18 KB, patch)
2009-04-01 01:51 PDT, Ilmari Heikkinen
no flags Details | Diff | Splinter Review
GLX ATI fglrx workarounds (9.61 KB, patch)
2009-04-05 13:28 PDT, Ilmari Heikkinen
vladimir: review-
Details | Diff | Splinter Review
GLX ATI workarounds (9.29 KB, patch)
2009-04-13 08:01 PDT, Ilmari Heikkinen
no flags Details | Diff | Splinter Review

Description User image Ilmari Heikkinen 2009-04-01 01:51:11 PDT
Created attachment 370372 [details] [diff] [review]
Workarounds for Linux ATI fglrx crashes and bugs

The Canvas 3D driver doesn't work with the fglrx drivers on Linux.

The ATI fglrx driver doesn't say that it's compatible with pbuffers in the glx server and glx extension strings, so the Canvas 3D extension doesn't try to use the ATI driver. The client string does say that it supports pbuffers (and it actually does), so maybe we could just skip the server&extension checks and rely on LoadSymbols to catch the missing symbols?

Disabling the checks makes Canvas 3D crash on fglrx drivers due to some subtle issues with their GLX implementation.

In particular:
  1. destroying the current pbuffer context causes a crash
  2. switching between contexts with different Display* causes a crash
  3. binding a second pbuffer to a context causes a crash
  4. pbuffer contexts don't work before making a non-pbuffer context current (on R300 at least)
Comment 1 User image Ilmari Heikkinen 2009-04-05 13:28:50 PDT
Created attachment 371163 [details] [diff] [review]
GLX ATI fglrx workarounds


- When resizing, put previous context in glXCreateNewContext share list to preserve textures, buffers and FBOs across resizes.

- Use glXGetClientString to check fbconfig and pbuffer support as the MESA-based drivers have pbuffer only in GLX client extensions.
Comment 2 User image Vladimir Vukicevic [:vlad] [:vladv] 2009-04-12 16:33:26 PDT
Comment on attachment 371163 [details] [diff] [review]
GLX ATI fglrx workarounds

So this is a bug in fglrx:

16:17 < ajax> the client extension list is the set of entrypoints that your libGL exposes.  the server list is the set of extensions that the
 renderer you're using supports.  the strict intersection is what you can actually use.
16:28 < vlad> with the DRI driver.. also advertises pbuffers only in client-side glx
16:29 < ajax> right, mesa's libgl has the entrypoints, but we don't have support for it in the server
16:29 < vlad> ok, so on the latter it's not supposed to work
16:30 < ajax> it _might_ work in fglrx anyway, but if it does it's a bug that they don't get the server extension list right

So I don't want to change the code for the pbuffer check entirely, but I think we can check the vendor string and employ this workaround if we see ATI/fglrx.
Comment 3 User image Ilmari Heikkinen 2009-04-13 01:56:38 PDT
Alright, I'll try and make the vendor string workaround. Also, we probably only need to check glXExtensionsString, as it's supposed to be the intersection of the server and client strings ( )
Comment 4 User image Ilmari Heikkinen 2009-04-13 08:01:57 PDT
Created attachment 372391 [details] [diff] [review]
GLX ATI workarounds

Using glXQueryExtensionsString for the ext check, skipping pbuffer check on vendor ATI.
Comment 5 User image Benoit Jacob [:bjacob] (mostly away) 2010-06-21 08:06:31 PDT
I'm pretty sure this must be fixed now, since we don't do that pbuffer check anymore.

Note You need to log in before you can comment on or make changes to this bug.