iris: Honor scanout requirement from DRI
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Fri, 24 Apr 2020 12:11:44 +0000 (15:11 +0300)
committerMarge Bot <eric+marge@anholt.net>
Thu, 25 Jun 2020 11:50:10 +0000 (11:50 +0000)
commit82b46667836647226387442b2feb9d7f1475bd36
treebf07f171134318f6fb3a439746070e64f1605a63
parentec7b55f4cc5dd3dc61eb6b9e51f46c58a2a896d3
iris: Honor scanout requirement from DRI

Translate PIPE_BIND_SCANOUT as ISL_SURF_USAGE_DISPLAY_BIT,
instead of PIPE_BIND_DISPLAY_TARGET.

PIPE_BIND_DISPLAY_TARGET isn't used for dri images and seem to
be set only for fake winsys buffers (which aren't displayed).
The trouble is that a fake buffer could be multisampled and we
cannot have multisampled surface with display bit.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2313
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4784>
src/gallium/drivers/iris/iris_resource.c