Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA Linux drivers don't support GLX_BIND_TO_TEXTURE_RGBA_EXT #1185

Closed
kmcallister opened this issue Nov 4, 2013 · 4 comments
Closed

NVIDIA Linux drivers don't support GLX_BIND_TO_TEXTURE_RGBA_EXT #1185

kmcallister opened this issue Nov 4, 2013 · 4 comments

Comments

@kmcallister
Copy link
Contributor

@kmcallister kmcallister commented Nov 4, 2013

@kmcallister
Copy link
Contributor Author

@kmcallister kmcallister commented Nov 5, 2013

Confirmed that Mesa with Intel graphics doesn't have this problem.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Nov 30, 2013

The first part (GLX_BIND_TO_TEXTURE_RGBA_EXT) is a bug on our part. We were calling glxChooseVisual, which was giving us a random visual that supported RGBA but not for textures, and then walking through the fb_configs looking for the fb_config that matched the visual and failing. Just calling glXChooseFBConfig (when supported) and getting the visual from that clears that part up.

Fix:
larsbergstrom/rust-layers@5dc342c

The second part on the mailing list, though, about getting BadAlloc on GPU rendering (and BadMatch on CPU, not mentioned there but present for RGBA) seems a bit trickier. BadAlloc indicates that we've already associated a GLX FBConfig with that X pixmap. Patch notes indicated maybe fixed in newer Nvidia drivers (Ubuntu is on 319; Nvidia is now on 331). Or we're still doing things wrong.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Dec 2, 2013

Indeed, I've confirmed that when the BadAlloc crash happens, we are attempting to create a GLX pixmap against an X pixmap that has already had a GLX pixmap created and destroyed against it. That first creation/destruction happens outside of rust-layers and I'm still tracking that part down (since there are two other places apart from rust-layers where we call glXDestroyPixmap - both skia and azure). I suspect this isn't a problem on Intel drivers because it appears to be implementation-specific whether destroying the GLX pixmap will also destroy the X pixmap or not.

For future people debugging related issues, https://github.com/apitrace/apitrace is super useful.

@mletterle
Copy link

@mletterle mletterle commented Dec 2, 2013

I can't tell you how happy I am that this is being looked at....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.