Commit 1dfb4414 authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer
Browse files

glamor: don't fail create_pixmap for depth=30

xf86GetPixFormat has a hardcoded list of format, and there's no
30 bits format there.

But the format isn't needed to actually create the pixmap, so
make a NULL format a non-failure case.

This fixes an application trying to create a pbuffer using the first
config from glXChooseFBConfig(...GLX_PBUFFER_BIT...). This config happens
to be a 30 bits one and without this change the app would exit with
a BadAlloc error.
parent 69365526
Pipeline #428476 passed with stages
in 3 minutes and 11 seconds
......@@ -206,15 +206,12 @@ amdgpu_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
struct amdgpu_pixmap *priv;
PixmapPtr pixmap, new_pixmap = NULL;
if (!format)
return NULL;
!info->shadow_primary &&
w >= scrn->virtualX &&
w <= scrn->displayWidth &&
h == scrn->virtualY &&
format->bitsPerPixel == scrn->bitsPerPixel)
(format && format->bitsPerPixel == scrn->bitsPerPixel))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment