From b2e94d05c9602e2814a513a51eed67d014b338f3 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 15 Feb 2010 17:17:30 +0000 Subject: gallium: Expose a opaque winsys handle and functions on pipe_screen Instead of having these functions on a side interface like on drm_api create a opaque winsys_handle that is to be passed down into the winsys. Currently the only thing ported to this new interface is drm_api, and of that only the components that builds by default is ported. All the drivers and any extra state trackers needs to be ported before this can go into master. --- src/gallium/state_trackers/egl/x11/native_dri2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gallium/state_trackers/egl/x11') diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index 8df58891a0..b80b376e12 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -112,6 +112,7 @@ dri2_surface_process_drawable_buffers(struct native_surface *nsurf, struct dri2_surface *dri2surf = dri2_surface(nsurf); struct dri2_display *dri2dpy = dri2surf->dri2dpy; struct pipe_texture templ; + struct winsys_handle whandle; uint valid_mask; int i; @@ -169,9 +170,11 @@ dri2_surface_process_drawable_buffers(struct native_surface *nsurf, continue; } - dri2surf->textures[natt] = - dri2dpy->api->texture_from_shared_handle(dri2dpy->api, - dri2dpy->base.screen, &templ, desc, xbuf->pitch, xbuf->name); + memset(&whandle, 0, sizeof(whandle)); + whandle.stride = xbuf->pitch; + whandle.handle = xbuf->name; + dri2surf->textures[natt] = dri2dpy->base.screen->texture_from_handle( + dri2dpy->base.screen, &templ, &whandle); if (dri2surf->textures[natt]) valid_mask |= 1 << natt; } -- cgit v1.2.3