aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2016-01-14 15:01:39 +0100
committerChristian König <[email protected]>2016-03-17 14:17:06 +0100
commit5aea0d691988af945e09e1d7cca28ca0759cc309 (patch)
tree21dc9eeb48b981b908a7e2b4b51565a5ae27516e /src/gallium/winsys/radeon/drm/radeon_drm_bo.c
parent04bc082f6a8bfc3b3774bb102d3200317609432e (diff)
radeon/winsys: add layer support for BO export
Add layer support to export individual array layers. 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.c3
1 files changed, 3 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 3f39827b307..08856dff430 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -995,6 +995,7 @@ fail:
static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
unsigned stride, unsigned offset,
+ unsigned slice_size,
struct winsys_handle *whandle)
{
struct drm_gem_flink flink;
@@ -1029,6 +1030,8 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
whandle->stride = stride;
whandle->offset = offset;
+ whandle->offset += slice_size * whandle->layer;
+
return TRUE;
}