summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/sw/kms-dri
diff options
context:
space:
mode:
authorChristian König <[email protected]>2016-01-12 15:19:54 +0100
committerChristian König <[email protected]>2016-03-17 14:16:03 +0100
commit29d26f1522d7f7be8f7d7791e37c3fcd8ac4544a (patch)
tree8dba94bee9d4390e0a773c2f445ed8ce7f1afd35 /src/gallium/winsys/sw/kms-dri
parent58fe7837b844da0c466a8573702d745f6f9975e6 (diff)
gallium/winsys/drm: add offset to struct winsys_handle
We are going to need this for EGL_EXT_image_dma_buf_import. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/sw/kms-dri')
-rw-r--r--src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index 1e859717f1c..9aaee8844be 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -309,17 +309,20 @@ kms_sw_displaytarget_get_handle(struct sw_winsys *winsys,
case DRM_API_HANDLE_TYPE_KMS:
whandle->handle = kms_sw_dt->handle;
whandle->stride = kms_sw_dt->stride;
+ whandle->offset = 0;
return TRUE;
case DRM_API_HANDLE_TYPE_FD:
if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle,
DRM_CLOEXEC, (int*)&whandle->handle)) {
whandle->stride = kms_sw_dt->stride;
+ whandle->offset = 0;
return TRUE;
}
/* fallthrough */
default:
whandle->handle = 0;
whandle->stride = 0;
+ whandle->offset = 0;
return FALSE;
}
}