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 <christopher.halse.rogers@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
This commit is contained in:
Christopher James Halse Rogers 2013-11-21 15:11:40 +11:00 committed by Maarten Lankhorst
parent d5a3a2d2fb
commit 6b5e15360a

View 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;