gallium/dri2: Fix creation of multi-planar modifier images
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 14 Nov 2019 21:59:58 +0000 (13:59 -0800)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 6 Dec 2019 20:31:48 +0000 (20:31 +0000)
commitd5c857837aae205c0e1fddee30300b4419e2bb3f
treefdd815d4abb7375b082b6d63b03c2bcc503a7f5a
parentab016a6a2d657d85f18741ba36261182db598c8f
gallium/dri2: Fix creation of multi-planar modifier images

The commit noted below assumed and enforced that DRM_MOD_INVALID was the
only valid modifier for multi-planar imported images. Due to that, it
required that modifier on multi-planar images to:

   1. Allow multiple planes.
   2. Perform YUV format lowering and extent adjustments.
   3. Use buffer_index to correctly map the given planes.

Fix these issues by removing or updating the code built on that
assumption.

Fixes: 2066966c106 ("gallium/dri2: Support creating multi-planar modifier images")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/state_trackers/dri/dri2.c