gallium/dri2: Set winsys_handle type to KMS for stride query.
authorChristopher James Halse Rogers <raof@ubuntu.com>
Thu, 21 Nov 2013 04:11:40 +0000 (15:11 +1100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 10 Dec 2013 08:46:09 +0000 (09:46 +0100)
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 <christopher.halse.rogers@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
src/gallium/state_trackers/dri/drm/dri2.c

index 2a2f8ac74982d4178617a339baa32fc9fd109eb4..59c072235cbe1afbdede799bac8f6cffe24a382e 100644 (file)
@@ -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;