From: Christopher James Halse Rogers Date: Thu, 21 Nov 2013 04:11:40 +0000 (+1100) Subject: gallium/dri2: Set winsys_handle type to KMS for stride query. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b5e15360a1cf56de7a223a89da0bf0d4693ec22;p=mesa.git gallium/dri2: Set winsys_handle type to KMS for stride query. Otherwise the default is TYPE_SHARED, which will flink the bo. This seems rather unnecessary for a simple stride query. Signed-off-by: Christopher James Halse Rogers Reviewed-by: Thomas Hellstrom Signed-off-by: Maarten Lankhorst --- diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 2a2f8ac7498..59c072235cb 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -691,6 +691,7 @@ dri2_query_image(__DRIimage *image, int attrib, int *value) switch (attrib) { case __DRI_IMAGE_ATTRIB_STRIDE: + whandle.type = DRM_API_HANDLE_TYPE_KMS; image->texture->screen->resource_get_handle(image->texture->screen, image->texture, &whandle); *value = whandle.stride;