diff options
author | Kristian Høgsberg <[email protected]> | 2013-09-26 12:25:11 -0700 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2013-10-11 15:14:35 -0700 |
commit | 360a141f24a9d00891665b7fedb77ffb116944ca (patch) | |
tree | 79ebe6820c6a23471849307af1d5b03f1b965de2 /src/gallium | |
parent | fe6974382b353efebf06dfb2d00b0b2c752fb666 (diff) |
wayland: Don't rely on static variable for identifying wl_drm buffers
Now that libEGL has been fixed to not leak all kinds of symbols, gbm
links to its own copy of the libwayland-drm.a helper library. That means
we can't rely on comparing the addresses of a static vtable symbol in that
library to determine if a wl_buffer is a wl_drm_buffer. Instead, we
move the vtable into the wl_drm struct and use that for comparing.
https://bugs.freedesktop.org/show_bug.cgi?id=69437
Cc: 9.2 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c index 3fd5fa2dbda..f9acb2afd6a 100644 --- a/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c +++ b/src/gallium/state_trackers/egl/common/native_wayland_drm_bufmgr.c @@ -139,7 +139,11 @@ static struct pipe_resource * wayland_drm_bufmgr_wl_buffer_get_resource(struct native_display *ndpy, struct wl_resource *buffer_resource) { - struct wl_drm_buffer *buffer = wayland_drm_buffer_get(buffer_resource); + struct wayland_drm_bufmgr *bufmgr; + struct wl_drm_buffer *buffer; + + bufmgr = wayland_drm_bufmgr(ndpy->wayland_bufmgr); + buffer = wayland_drm_buffer_get(bufmgr->wl_server_drm, buffer_resource); if (!buffer) return NULL; @@ -152,9 +156,12 @@ wayland_drm_bufmgr_query_buffer(struct native_display *ndpy, struct wl_resource *buffer_resource, int attribute, int *value) { - struct wl_drm_buffer *buffer = wayland_drm_buffer_get(buffer_resource); + struct wayland_drm_bufmgr *bufmgr; + struct wl_drm_buffer *buffer; struct pipe_resource *resource; + bufmgr = wayland_drm_bufmgr(ndpy->wayland_bufmgr); + buffer = wayland_drm_buffer_get(bufmgr->wl_server_drm, buffer_resource); if (!buffer) return FALSE; |