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/winsys/radeon | |
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/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 950cbb3e55f..2c10e2eb622 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -858,6 +858,12 @@ static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws, unsigned handle; uint64_t size = 0; + if (!offset && whandle->offset != 0) { + fprintf(stderr, "attempt to import unsupported winsys offset %u\n", + whandle->offset); + return NULL; + } + /* We must maintain a list of pairs <handle, bo>, so that we always return * the same BO for one particular handle. If we didn't do that and created * more than one BO for the same handle and then relocated them in a CS, |