From: Daniel Stone Date: Mon, 2 Apr 2018 12:20:34 +0000 (+0100) Subject: st/dri: Initialise modifier to INVALID for DRI2 X-Git-Tag: upstream/18.1.0~486 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cbecb61682a0ee426faaa03d824fc8fd7aef826;p=platform%2Fupstream%2Fmesa.git st/dri: Initialise modifier to INVALID for DRI2 When allocating a buffer for DRI2, set the modifier to INVALID to inform the backend that we have no supplied modifiers and it should do its own thing. The missed initialisation forced linear, even if the implementation had made other decisions. This resulted in VC4 DRI2 clients failing with: Modifier 0x0 vs. tiling (0x700000000000001) mismatch Signed-off-by: Daniel Stone Reported-by: Andreas Müller Reviewed-by: Eric Anholt Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle") --- diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 31d17d4..58a6757 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -806,6 +806,7 @@ dri2_allocate_textures(struct dri_context *ctx, whandle.handle = buf->name; whandle.stride = buf->pitch; whandle.offset = 0; + whandle.modifier = DRM_FORMAT_MOD_INVALID; if (screen->can_share_buffer) whandle.type = DRM_API_HANDLE_TYPE_SHARED; else