summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_drm.c
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2014-01-28 16:21:21 -0800
committerChad Versace <chad.versace@linux.intel.com>2014-03-17 15:36:03 -0700
commitad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2 (patch)
tree6a3e6f3fcdff841c5171764840e6323a48fc7056 /src/egl/drivers/dri2/platform_drm.c
parent8b9298af0a3bce1360cc2c020b31470b37b660fe (diff)
downloadexternal_mesa3d-ad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2.zip
external_mesa3d-ad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2.tar.gz
external_mesa3d-ad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2.tar.bz2
egl/dri2: Dispatch eglSwapBuffers by display, not driver
Add dri2_egl_display_vtbl::swap_buffers, set it for each platform, and let egl_dri2 dispatch eglSwapBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/egl/drivers/dri2/platform_drm.c')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 45f8ae6..c0999dc 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -444,6 +444,7 @@ dri2_drm_authenticate(_EGLDisplay *disp, uint32_t id)
static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
.authenticate = dri2_drm_authenticate,
.swap_interval = dri2_fallback_swap_interval,
+ .swap_buffers = dri2_drm_swap_buffers,
};
EGLBoolean
@@ -540,7 +541,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
drv->API.CreateWindowSurface = dri2_drm_create_window_surface;
drv->API.DestroySurface = dri2_drm_destroy_surface;
- drv->API.SwapBuffers = dri2_drm_swap_buffers;
drv->API.CreateImageKHR = dri2_drm_create_image_khr;
drv->API.QueryBufferAge = dri2_drm_query_buffer_age;