summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <[email protected]>2013-11-21 15:11:39 +1100
committerMaarten Lankhorst <[email protected]>2013-12-10 09:46:05 +0100
commitd5a3a2d2fbc42da04ff7ea09356ada134a42d6dd (patch)
tree78713128416960253fd27072b8197f598e91dd13 /src/gallium/state_trackers
parent343133167f4ae127a375791790c982bde12025c4 (diff)
gallium/winsys/drm: Prepare for passing prime fds in winsys_handle
Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c2
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.c1
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 27f214780fc..2a2f8ac7498 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -265,6 +265,7 @@ dri2_drawable_process_buffers(struct dri_context *ctx,
templ.format = format;
templ.bind = bind;
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
whandle.handle = buf->name;
whandle.stride = buf->pitch;
@@ -578,6 +579,7 @@ dri2_create_image_from_name(__DRIscreen *_screen,
memset(&whandle, 0, sizeof(whandle));
whandle.handle = name;
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
whandle.stride = pitch * util_format_get_blocksize(pf);
img->texture = screen->base.screen->resource_from_handle(screen->base.screen,
diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
index b578a8afe96..d1e1acdab4c 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.c
+++ b/src/gallium/state_trackers/egl/common/native_helper.c
@@ -427,6 +427,7 @@ drm_display_import_native_buffer(struct native_display *ndpy,
memset(&wsh, 0, sizeof(wsh));
wsh.handle = nbuf->u.drm.name;
+ wsh.type = DRM_API_HANDLE_TYPE_SHARED;
wsh.stride = nbuf->u.drm.stride;
res = screen->resource_from_handle(screen, &nbuf->u.drm.templ, &wsh);
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 3c58979e295..bbd962d6962 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -173,6 +173,7 @@ dri2_surface_process_drawable_buffers(struct native_surface *nsurf,
}
memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
whandle.stride = xbuf->pitch;
whandle.handle = xbuf->name;
dri2surf->textures[natt] = dri2dpy->base.screen->resource_from_handle(