glamor/glxprov: Stop exposing non-db(-capable) configs

This commit is contained in:
Adam Jackson 2022-02-25 13:41:41 -05:00 committed by Konstantin
parent 58b88ba0b1
commit a563f530f6

View File

@ -142,8 +142,7 @@ egl_create_glx_drawable(ClientPtr client, __GLXscreen *screen,
static struct egl_config * static struct egl_config *
translate_eglconfig(struct egl_screen *screen, EGLConfig hc, translate_eglconfig(struct egl_screen *screen, EGLConfig hc,
struct egl_config *chain, Bool direct_color, struct egl_config *chain, Bool direct_color,
Bool double_buffer, Bool duplicate_for_composite, Bool duplicate_for_composite, Bool srgb_only)
Bool srgb_only)
{ {
EGLint value; EGLint value;
struct egl_config *c = calloc(1, sizeof *c); struct egl_config *c = calloc(1, sizeof *c);
@ -191,10 +190,8 @@ translate_eglconfig(struct egl_screen *screen, EGLConfig hc,
else else
c->base.visualType = GLX_TRUE_COLOR; c->base.visualType = GLX_TRUE_COLOR;
if (double_buffer) /* We choose not to implement front-buffer-only configs */
c->base.doubleBufferMode = GL_TRUE; c->base.doubleBufferMode = GL_TRUE;
else
c->base.doubleBufferMode = GL_FALSE;
/* direct-mapped state */ /* direct-mapped state */
#define GET(attr, slot) \ #define GET(attr, slot) \
@ -320,7 +317,7 @@ translate_eglconfig(struct egl_screen *screen, EGLConfig hc,
static __GLXconfig * static __GLXconfig *
egl_mirror_configs(ScreenPtr pScreen, struct egl_screen *screen) egl_mirror_configs(ScreenPtr pScreen, struct egl_screen *screen)
{ {
int i, j, k, nconfigs; int i, j, nconfigs;
struct egl_config *c = NULL; struct egl_config *c = NULL;
EGLConfig *host_configs = NULL; EGLConfig *host_configs = NULL;
bool can_srgb = epoxy_has_gl_extension("GL_ARB_framebuffer_sRGB") || bool can_srgb = epoxy_has_gl_extension("GL_ARB_framebuffer_sRGB") ||
@ -337,18 +334,15 @@ egl_mirror_configs(ScreenPtr pScreen, struct egl_screen *screen)
* ->next chain easier. * ->next chain easier.
*/ */
for (i = nconfigs - 1; i >= 0; i--) for (i = nconfigs - 1; i >= 0; i--)
for (j = 0; j < 3; j++) /* direct_color */ for (j = 0; j < 3; j++) { /* direct_color */
for (k = 0; k < 2; k++) /* double_buffer */ {
if (can_srgb) if (can_srgb)
c = translate_eglconfig(screen, host_configs[i], c, c = translate_eglconfig(screen, host_configs[i], c,
/* direct_color */ j == 1, /* direct_color */ j == 1,
/* double_buffer */ k > 0,
/* duplicate_for_composite */ j == 0, /* duplicate_for_composite */ j == 0,
/* srgb_only */ true); /* srgb_only */ true);
c = translate_eglconfig(screen, host_configs[i], c, c = translate_eglconfig(screen, host_configs[i], c,
/* direct_color */ j == 1, /* direct_color */ j == 1,
/* double_buffer */ k > 0,
/* duplicate_for_composite */ j == 0, /* duplicate_for_composite */ j == 0,
/* srgb_only */ false); /* srgb_only */ false);
} }