summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_drawable.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-08 12:03:46 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-08 12:03:46 +0000
commit3ca933623cf0fd3b025ab7d1b37d3fd01c854807 (patch)
treee4682a56c3ff41f4d698dee76d94447a9343608e /src/gallium/state_trackers/dri/dri_drawable.c
parent9860f652e271d03672ec3e5f0e379170953a1e56 (diff)
parent5024a39d111e2cef176a18e17f18917c2242ec72 (diff)
downloadexternal_mesa3d-3ca933623cf0fd3b025ab7d1b37d3fd01c854807.zip
external_mesa3d-3ca933623cf0fd3b025ab7d1b37d3fd01c854807.tar.gz
external_mesa3d-3ca933623cf0fd3b025ab7d1b37d3fd01c854807.tar.bz2
Merge commit 'origin/gallium-winsys-handle-rebased'
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 173f404..4584738 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -58,6 +58,7 @@ dri_surface_from_handle(struct drm_api *api,
struct pipe_surface *surface = NULL;
struct pipe_texture *texture = NULL;
struct pipe_texture templat;
+ struct winsys_handle whandle;
memset(&templat, 0, sizeof(templat));
templat.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -68,8 +69,11 @@ dri_surface_from_handle(struct drm_api *api,
templat.width0 = width;
templat.height0 = height;
- texture = api->texture_from_shared_handle(api, screen, &templat,
- "dri2 buffer", pitch, handle);
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.handle = handle;
+ whandle.stride = pitch;
+
+ texture = screen->texture_from_handle(screen, &templat, &whandle);
if (!texture) {
debug_printf("%s: Failed to blanket the buffer with a texture\n", __func__);