[Mesa-dev] [PATCH 02/15] gallium/dri2: Set winsys_handle type to KMS for stride query.
Christopher James Halse Rogers
christopher.halse.rogers at canonical.com
Sat Jul 20 04:40:34 PDT 2013
Otherwise the default is TYPE_SHARED, which will flink the bo. This seems
rather unnecessary for a simple stride query.
---
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 7b518a8..74e14af 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -693,6 +693,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;
--
1.8.3.2
More information about the mesa-dev
mailing list