[Mesa-dev] [PATCH mesa 3/6] egl_dri2: drop dri2_egl_driver struct
Eric Engestrom
eric at engestrom.ch
Tue Sep 26 22:47:18 UTC 2017
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
src/egl/drivers/dri2/egl_dri2.c | 101 +++++++++++++++++++---------------------
src/egl/drivers/dri2/egl_dri2.h | 5 --
2 files changed, 49 insertions(+), 57 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a8f47cb036..a2c0d98319 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -3175,66 +3175,63 @@ dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx,
_EGLDriver *
_eglBuiltInDriverDRI2(const char *args)
{
- struct dri2_egl_driver *dri2_drv;
-
- (void) args;
-
- dri2_drv = calloc(1, sizeof *dri2_drv);
+ _EGLDriver *dri2_drv = calloc(1, sizeof *dri2_drv);
if (!dri2_drv)
return NULL;
+ (void) args;
- _eglInitDriverFallbacks(&dri2_drv->base);
- dri2_drv->base.API.Initialize = dri2_initialize;
- dri2_drv->base.API.Terminate = dri2_terminate;
- dri2_drv->base.API.CreateContext = dri2_create_context;
- dri2_drv->base.API.DestroyContext = dri2_destroy_context;
- dri2_drv->base.API.MakeCurrent = dri2_make_current;
- dri2_drv->base.API.CreateWindowSurface = dri2_create_window_surface;
- dri2_drv->base.API.CreatePixmapSurface = dri2_create_pixmap_surface;
- dri2_drv->base.API.CreatePbufferSurface = dri2_create_pbuffer_surface;
- dri2_drv->base.API.DestroySurface = dri2_destroy_surface;
- dri2_drv->base.API.GetProcAddress = dri2_get_proc_address;
- dri2_drv->base.API.WaitClient = dri2_wait_client;
- dri2_drv->base.API.WaitNative = dri2_wait_native;
- dri2_drv->base.API.BindTexImage = dri2_bind_tex_image;
- dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image;
- dri2_drv->base.API.SwapInterval = dri2_swap_interval;
- dri2_drv->base.API.SwapBuffers = dri2_swap_buffers;
- dri2_drv->base.API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
- dri2_drv->base.API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
- dri2_drv->base.API.SetDamageRegion = dri2_set_damage_region;
- dri2_drv->base.API.PostSubBufferNV = dri2_post_sub_buffer;
- dri2_drv->base.API.CopyBuffers = dri2_copy_buffers,
- dri2_drv->base.API.QueryBufferAge = dri2_query_buffer_age;
- dri2_drv->base.API.CreateImageKHR = dri2_create_image;
- dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr;
- dri2_drv->base.API.CreateWaylandBufferFromImageWL = dri2_create_wayland_buffer_from_image;
- dri2_drv->base.API.QuerySurface = dri2_query_surface;
+ _eglInitDriverFallbacks(dri2_drv);
+ dri2_drv->API.Initialize = dri2_initialize;
+ dri2_drv->API.Terminate = dri2_terminate;
+ dri2_drv->API.CreateContext = dri2_create_context;
+ dri2_drv->API.DestroyContext = dri2_destroy_context;
+ dri2_drv->API.MakeCurrent = dri2_make_current;
+ dri2_drv->API.CreateWindowSurface = dri2_create_window_surface;
+ dri2_drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
+ dri2_drv->API.CreatePbufferSurface = dri2_create_pbuffer_surface;
+ dri2_drv->API.DestroySurface = dri2_destroy_surface;
+ dri2_drv->API.GetProcAddress = dri2_get_proc_address;
+ dri2_drv->API.WaitClient = dri2_wait_client;
+ dri2_drv->API.WaitNative = dri2_wait_native;
+ dri2_drv->API.BindTexImage = dri2_bind_tex_image;
+ dri2_drv->API.ReleaseTexImage = dri2_release_tex_image;
+ dri2_drv->API.SwapInterval = dri2_swap_interval;
+ dri2_drv->API.SwapBuffers = dri2_swap_buffers;
+ dri2_drv->API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
+ dri2_drv->API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
+ dri2_drv->API.SetDamageRegion = dri2_set_damage_region;
+ dri2_drv->API.PostSubBufferNV = dri2_post_sub_buffer;
+ dri2_drv->API.CopyBuffers = dri2_copy_buffers,
+ dri2_drv->API.QueryBufferAge = dri2_query_buffer_age;
+ dri2_drv->API.CreateImageKHR = dri2_create_image;
+ dri2_drv->API.DestroyImageKHR = dri2_destroy_image_khr;
+ dri2_drv->API.CreateWaylandBufferFromImageWL = dri2_create_wayland_buffer_from_image;
+ dri2_drv->API.QuerySurface = dri2_query_surface;
#ifdef HAVE_LIBDRM
- dri2_drv->base.API.CreateDRMImageMESA = dri2_create_drm_image_mesa;
- dri2_drv->base.API.ExportDRMImageMESA = dri2_export_drm_image_mesa;
- dri2_drv->base.API.ExportDMABUFImageQueryMESA = dri2_export_dma_buf_image_query_mesa;
- dri2_drv->base.API.ExportDMABUFImageMESA = dri2_export_dma_buf_image_mesa;
- dri2_drv->base.API.QueryDmaBufFormatsEXT = dri2_query_dma_buf_formats;
- dri2_drv->base.API.QueryDmaBufModifiersEXT = dri2_query_dma_buf_modifiers;
+ dri2_drv->API.CreateDRMImageMESA = dri2_create_drm_image_mesa;
+ dri2_drv->API.ExportDRMImageMESA = dri2_export_drm_image_mesa;
+ dri2_drv->API.ExportDMABUFImageQueryMESA = dri2_export_dma_buf_image_query_mesa;
+ dri2_drv->API.ExportDMABUFImageMESA = dri2_export_dma_buf_image_mesa;
+ dri2_drv->API.QueryDmaBufFormatsEXT = dri2_query_dma_buf_formats;
+ dri2_drv->API.QueryDmaBufModifiersEXT = dri2_query_dma_buf_modifiers;
#endif
#ifdef HAVE_WAYLAND_PLATFORM
- dri2_drv->base.API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
- dri2_drv->base.API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
- dri2_drv->base.API.QueryWaylandBufferWL = dri2_query_wayland_buffer_wl;
+ dri2_drv->API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
+ dri2_drv->API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
+ dri2_drv->API.QueryWaylandBufferWL = dri2_query_wayland_buffer_wl;
#endif
- dri2_drv->base.API.GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium;
- dri2_drv->base.API.CreateSyncKHR = dri2_create_sync;
- dri2_drv->base.API.ClientWaitSyncKHR = dri2_client_wait_sync;
- dri2_drv->base.API.SignalSyncKHR = dri2_signal_sync;
- dri2_drv->base.API.WaitSyncKHR = dri2_server_wait_sync;
- dri2_drv->base.API.DestroySyncKHR = dri2_destroy_sync;
- dri2_drv->base.API.GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
- dri2_drv->base.API.GLInteropExportObject = dri2_interop_export_object;
- dri2_drv->base.API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
+ dri2_drv->API.GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium;
+ dri2_drv->API.CreateSyncKHR = dri2_create_sync;
+ dri2_drv->API.ClientWaitSyncKHR = dri2_client_wait_sync;
+ dri2_drv->API.SignalSyncKHR = dri2_signal_sync;
+ dri2_drv->API.WaitSyncKHR = dri2_server_wait_sync;
+ dri2_drv->API.DestroySyncKHR = dri2_destroy_sync;
+ dri2_drv->API.GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
+ dri2_drv->API.GLInteropExportObject = dri2_interop_export_object;
+ dri2_drv->API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
- dri2_drv->base.Name = "DRI2";
+ dri2_drv->Name = "DRI2";
- return &dri2_drv->base;
+ return dri2_drv;
}
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index eea459113a..0c2eb898ec 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -79,11 +79,6 @@ struct zwp_linux_dmabuf_v1;
struct wl_buffer;
-struct dri2_egl_driver
-{
- _EGLDriver base;
-};
-
struct dri2_egl_display_vtbl {
int (*authenticate)(_EGLDisplay *disp, uint32_t id);
--
Cheers,
Eric
More information about the mesa-dev
mailing list