glx: Allow depth-30 pbuffers to work without a depth-30 pixmap format
The backing pixmap needs to be big enough to hold depth-30 rendering, but the server doesn't necessarily have a depth-30 pixmap format. Just round up to the 32bpp format you'd be using anyway. Fixes: mesa/mesa#3527 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6764>
This commit is contained in:
@@ -558,6 +558,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
|
||||
unsigned int i;
|
||||
Pixmap pixmap;
|
||||
GLboolean glx_1_3 = GL_FALSE;
|
||||
int depth = config->rgbBits;
|
||||
|
||||
if (priv == NULL)
|
||||
return None;
|
||||
@@ -622,8 +623,11 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
|
||||
if (depth == 30)
|
||||
depth = 32;
|
||||
|
||||
pixmap = XCreatePixmap(dpy, RootWindow(dpy, config->screen),
|
||||
width, height, config->rgbBits);
|
||||
width, height, depth);
|
||||
|
||||
if (!CreateDRIDrawable(dpy, config, pixmap, id, attrib_list, i)) {
|
||||
CARD32 o = glx_1_3 ? X_GLXDestroyPbuffer : X_GLXvop_DestroyGLXPbufferSGIX;
|
||||
|
Reference in New Issue
Block a user