From 6b5e15360a1cf56de7a223a89da0bf0d4693ec22 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Thu, 21 Nov 2013 15:11:40 +1100 Subject: [PATCH] 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 --- src/gallium/state_trackers/dri/drm/dri2.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2