Avoid using 10bit FBConfigs

Fix weird color issue with Mesa 18.0

(cherry picked from commit a94535c16e)
pull/182/head
Yuxuan Shui 6 years ago committed by Slávek Banko
parent bc08650da1
commit 1689b33300

@ -811,6 +811,16 @@ glx_cmp_fbconfig(session_t *ps,
return -1;
if (!pfbc_b)
return 1;
int tmpattr;
// Avoid 10-bit colors
glXGetFBConfigAttrib(ps->dpy, pfbc_a->cfg, GLX_RED_SIZE, &tmpattr);
if (tmpattr != 8)
return -1;
glXGetFBConfigAttrib(ps->dpy, pfbc_b->cfg, GLX_RED_SIZE, &tmpattr);
if (tmpattr != 8)
return 1;
#define P_CMPATTR_LT(attr) { if ((result = glx_cmp_fbconfig_cmpattr(ps, pfbc_a, pfbc_b, (attr)))) return -result; }
#define P_CMPATTR_GT(attr) { if ((result = glx_cmp_fbconfig_cmpattr(ps, pfbc_a, pfbc_b, (attr)))) return result; }

Loading…
Cancel
Save