Created attachment 135000 [details] [review]
patch: Don't blindly use GetPixelFormat() return value
This is a follow-up to bug 101326.
The patch for that bug blindly took the pixel format index returned by GetPixelFormat(). However, what's the guarantee that this pixel format index is actually sensible in the Mesa context, or even a valid index?
Well, none actually. (It's also not an entirely theoretic problem. I received a crash report where an invalid index is indicated, though I couldn't reproduce the exact scenario.)
The attached patch fixes the blind usage of the index by computing the proper Mesa pixel format index from the pixel format description.
Thanks. Looks good AFAICT. I'll do a little reformatting and testing before pushing.
Pushed as commit bf41b2b2627aa3790d380092c28c5d3395cc9cde