diff options
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 103 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 5 |
2 files changed, 50 insertions, 58 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 381899cd8ba..72e60858a8c 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -3200,64 +3200,61 @@ dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx, _EGLDriver * _eglBuiltInDriver(void) { - struct dri2_egl_driver *dri2_drv; - - dri2_drv = calloc(1, sizeof *dri2_drv); + _EGLDriver *dri2_drv = calloc(1, sizeof *dri2_drv); if (!dri2_drv) return NULL; - - _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->base.Name = "DRI2"; - - return &dri2_drv->base; + 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->Name = "DRI2"; + + return dri2_drv; } diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 61a4bcc1c7d..cd2487ab226 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); |