[Mesa-dev] [PATCH 3/9] gallium/dri2: Set winsys_handle type to KMS for stride query.
Thomas Hellstrom
thellstrom at vmware.com
Thu Nov 21 05:12:26 PST 2013
On 11/21/2013 05:11 AM, christopher.halse.rogers at canonical.com wrote:
> From: Christopher James Halse Rogers <raof at ubuntu.com>
>
> Otherwise the default is TYPE_SHARED, which will flink the bo. This seems
> rather unnecessary for a simple stride query.
Is there no way we can cache this stuff in a __DRIimage? Changing the
calling conventions to adapt to poor implementations seems like
the wrong way to go. What if other drivers use a slow approach to get
the KMS handle?
/Thomas
> ---
> 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 42c863b..db034bd 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;
More information about the mesa-dev
mailing list