Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / drivers / identity / id_drm.c
index 12b516b445f1c440ab1725f7786f42673cd51f34..d332c36af261eb35cfca86b12f73f68b807d7415 100644 (file)
 #include "state_tracker/drm_api.h"
 
 #include "util/u_memory.h"
-#include "identity/id_drm.h"
-#include "identity/id_screen.h"
-#include "identity/id_public.h"
-#include "identity/id_screen.h"
-#include "identity/id_objects.h"
+#include "id_drm.h"
+#include "id_screen.h"
+#include "id_public.h"
 
 struct identity_drm_api
 {
@@ -63,62 +61,6 @@ identity_drm_create_screen(struct drm_api *_api, int fd,
    return identity_screen_create(screen);
 }
 
-
-static struct pipe_texture *
-identity_drm_texture_from_shared_handle(struct drm_api *_api,
-                                        struct pipe_screen *_screen,
-                                        struct pipe_texture *templ,
-                                        const char *name,
-                                        unsigned stride,
-                                        unsigned handle)
-{
-   struct identity_screen *id_screen = identity_screen(_screen);
-   struct identity_drm_api *id_api = identity_drm_api(_api);
-   struct pipe_screen *screen = id_screen->screen;
-   struct drm_api *api = id_api->api;
-   struct pipe_texture *result;
-
-   result = api->texture_from_shared_handle(api, screen, templ, name, stride, handle);
-
-   result = identity_texture_create(identity_screen(_screen), result);
-
-   return result;
-}
-
-static boolean
-identity_drm_shared_handle_from_texture(struct drm_api *_api,
-                                        struct pipe_screen *_screen,
-                                        struct pipe_texture *_texture,
-                                        unsigned *stride,
-                                        unsigned *handle)
-{
-   struct identity_screen *id_screen = identity_screen(_screen);
-   struct identity_texture *id_texture = identity_texture(_texture);
-   struct identity_drm_api *id_api = identity_drm_api(_api);
-   struct pipe_screen *screen = id_screen->screen;
-   struct pipe_texture *texture = id_texture->texture;
-   struct drm_api *api = id_api->api;
-
-   return api->shared_handle_from_texture(api, screen, texture, stride, handle);
-}
-
-static boolean
-identity_drm_local_handle_from_texture(struct drm_api *_api,
-                                       struct pipe_screen *_screen,
-                                       struct pipe_texture *_texture,
-                                       unsigned *stride,
-                                       unsigned *handle)
-{
-   struct identity_screen *id_screen = identity_screen(_screen);
-   struct identity_texture *id_texture = identity_texture(_texture);
-   struct identity_drm_api *id_api = identity_drm_api(_api);
-   struct pipe_screen *screen = id_screen->screen;
-   struct pipe_texture *texture = id_texture->texture;
-   struct drm_api *api = id_api->api;
-
-   return api->local_handle_from_texture(api, screen, texture, stride, handle);
-}
-
 static void
 identity_drm_destroy(struct drm_api *_api)
 {
@@ -142,10 +84,9 @@ identity_drm_create(struct drm_api *api)
    if (!id_api)
       goto error;
 
+   id_api->base.name = api->name;
+   id_api->base.driver_name = api->driver_name;
    id_api->base.create_screen = identity_drm_create_screen;
-   id_api->base.texture_from_shared_handle = identity_drm_texture_from_shared_handle;
-   id_api->base.shared_handle_from_texture = identity_drm_shared_handle_from_texture;
-   id_api->base.local_handle_from_texture = identity_drm_local_handle_from_texture;
    id_api->base.destroy = identity_drm_destroy;
    id_api->api = api;