diff options
author | Stanimir Varbanov <[email protected]> | 2016-05-27 01:10:37 +0300 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-05-30 10:26:35 +0100 |
commit | e382bc649b95aa2ab6e86d60b0520236b2bf2947 (patch) | |
tree | 795d03d6c872604a60bcf60b6c0c28ff85630799 /src/gallium/state_trackers/dri | |
parent | 30d28d7c3148a7f7f2244b117ac0158930e95966 (diff) |
gallium: push offset down to driver
Push offset down to drivers when importing dmabuf. This is needed
to more fully support EGL_EXT_image_dma_buf_import when a non-zero
offset is specified.
Tesing has been done for freedreno, and compile tested following
gallium drivers:
nouveau,svga,virgl,r600,r300,radeonsi,swrast,i915,ilo
Signed-off-by: Stanimir Varbanov <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 182d4e6b3e2..8dea6715d7d 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -790,8 +790,6 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, templ.depth0 = 1; templ.array_size = 1; - whandle->offset = 0; - img->texture = screen->base.screen->resource_from_handle(screen->base.screen, &templ, whandle, PIPE_HANDLE_USAGE_READ_WRITE); if (!img->texture) { @@ -842,7 +840,7 @@ dri2_create_image_from_fd(__DRIscreen *_screen, __DRIimage *img = NULL; unsigned err = __DRI_IMAGE_ERROR_SUCCESS; - if (num_fds != 1 || offsets[0] != 0) { + if (num_fds != 1) { err = __DRI_IMAGE_ERROR_BAD_MATCH; goto exit; } @@ -1056,8 +1054,6 @@ dri2_from_names(__DRIscreen *screen, int width, int height, int format, if (num_names != 1) return NULL; - if (offsets[0] != 0) - return NULL; format = convert_fourcc(format, &dri_components); if (format == -1) @@ -1067,6 +1063,7 @@ dri2_from_names(__DRIscreen *screen, int width, int height, int format, whandle.type = DRM_API_HANDLE_TYPE_SHARED; whandle.handle = names[0]; whandle.stride = strides[0]; + whandle.offset = offsets[0]; img = dri2_create_image_from_winsys(screen, width, height, format, &whandle, loaderPrivate); |