diff options
author | Christian König <[email protected]> | 2016-01-12 15:59:11 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2016-03-17 14:17:03 +0100 |
commit | 04bc082f6a8bfc3b3774bb102d3200317609432e (patch) | |
tree | 9ef4d2a8ffe48087f97d4e00674c4aa17e9df33f /src/gallium/winsys/radeon/drm/radeon_drm_bo.c | |
parent | f1e78a48f2ec2645eb87d134c6961815dc89a307 (diff) |
radeon/winsys: add offset support for BO import/export
Add offset support to handle NV12 offsets as well.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_drm_bo.c')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 9e5d7d2e7a0..3f39827b307 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -851,7 +851,8 @@ static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws, static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws, struct winsys_handle *whandle, - unsigned *stride) + unsigned *stride, + unsigned *offset) { struct radeon_drm_winsys *ws = radeon_drm_winsys(rws); struct radeon_bo *bo; @@ -941,6 +942,8 @@ done: if (stride) *stride = whandle->stride; + if (offset) + *offset = whandle->offset; if (ws->info.has_virtual_memory && !bo->va) { struct drm_radeon_gem_va va; @@ -991,7 +994,7 @@ fail: } static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer, - unsigned stride, + unsigned stride, unsigned offset, struct winsys_handle *whandle) { struct drm_gem_flink flink; @@ -1025,7 +1028,7 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer, } whandle->stride = stride; - whandle->offset = 0; + whandle->offset = offset; return TRUE; } |