st/dri: Initialise modifier to INVALID for DRI2
authorDaniel Stone <daniels@collabora.com>
Mon, 2 Apr 2018 12:20:34 +0000 (13:20 +0100)
committerDaniel Stone <daniels@collabora.com>
Mon, 2 Apr 2018 18:07:57 +0000 (19:07 +0100)
commit4cbecb61682a0ee426faaa03d824fc8fd7aef826
tree16dd6af79b36b62ea9a96f901cca4e69dc1fdf57
parent2be6143032939c5c5fb6de4a44ffe3b076e1f098
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 <daniels@collabora.com>
Reported-by: Andreas Müller <schnitzeltony@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: 3f8513172ff6 ("gallium/winsys/drm: introduce modifier field to winsys_handle")
src/gallium/state_trackers/dri/dri2.c