summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stone <[email protected]>2018-04-02 13:20:34 +0100
committerJuan A. Suarez Romero <[email protected]>2018-04-12 21:49:31 +0200
commit44c7d1aa2ea46b019b132ac095b50341aa13d26c (patch)
tree9bf2f6eb16daefb886ee8c79e34696278811518e
parentf2a13363cf1a1b982ab7ce6bfe7867b97e86d947 (diff)
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 <[email protected]> Reported-by: Andreas Müller <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle") (cherry picked from commit 4cbecb61682a0ee426faaa03d824fc8fd7aef826)
-rw-r--r--src/gallium/state_trackers/dri/dri2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 5b0fb0802d3..2c3a6e0d194 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -770,6 +770,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