crocus: Honor scanout requirement from DRI
authorDave Airlie <airlied@redhat.com>
Thu, 7 Oct 2021 22:35:19 +0000 (08:35 +1000)
committerMarge Bot <eric+marge@anholt.net>
Fri, 8 Oct 2021 01:03:57 +0000 (01:03 +0000)
commit40fdb35c651d982cdf727721dc46c29c928b2853
tree550d3f59e13762012d455b7a4028417df30be394
parent8e735dc72c942f3fb45e31775dcd52cd31c6f890
crocus: 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.

Ported from iris 82b46667836647226387442b2feb9d7f1475bd36

Fixes: f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Jason Ekstrand <jason@jlekstrand.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13260>
src/gallium/drivers/crocus/crocus_resource.c