summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-09-13 12:36:54 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-10-07 15:18:03 +0100
commit4ea5ed9f51c2ec851ac2d81108035bf7046bbc69 (patch)
tree9f3ee3bd2e3e66cd0ddac2f2605c5cde7ee27a13 /src/egl/drivers/dri2/platform_x11.c
parent858f2f2ae6d72f338fdd6d544b0c733814e22724 (diff)
downloadexternal_mesa3d-4ea5ed9f51c2ec851ac2d81108035bf7046bbc69.zip
external_mesa3d-4ea5ed9f51c2ec851ac2d81108035bf7046bbc69.tar.gz
external_mesa3d-4ea5ed9f51c2ec851ac2d81108035bf7046bbc69.tar.bz2
egl/dri2: enable EGL_KHR_gl_colorspace for swrast
No driver changes needed for softpipe/llvmpipe - things just work. v2: Whitespace fixes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 7991fc2..88a06a8 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -206,6 +206,7 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
xcb_generic_error_t *error;
xcb_drawable_t drawable;
xcb_screen_t *screen;
+ const __DRIconfig *config;
STATIC_ASSERT(sizeof(uintptr_t) == sizeof(native_surface));
drawable = (uintptr_t) native_surface;
@@ -245,19 +246,18 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
dri2_surf->drawable = drawable;
}
- if (dri2_dpy->dri2) {
- const __DRIconfig *config =
- dri2_get_dri_config(dri2_conf, type, dri2_surf->base.GLColorspace);
+ config = dri2_get_dri_config(dri2_conf, type,
+ dri2_surf->base.GLColorspace);
+ if (dri2_dpy->dri2) {
dri2_surf->dri_drawable =
(*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
dri2_surf);
} else {
assert(dri2_dpy->swrast);
dri2_surf->dri_drawable =
- (*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
- dri2_conf->dri_double_config,
- dri2_surf);
+ (*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen, config,
+ dri2_surf);
}
if (dri2_surf->dri_drawable == NULL) {