zink: reject resource-imports with modifiers
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 19 Oct 2020 09:17:30 +0000 (11:17 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 19 Oct 2020 14:42:57 +0000 (14:42 +0000)
commit3c0ba7b1802bf231ef3f0a7bdbeb474be99a2aed
tree692c5c6960b37f74cb968d4c78d841a7a7e57d13
parent068b4bf76c03a983982be8af13daf228be4531ce
zink: reject resource-imports with modifiers

Zink doesn't support forwarding DRM modifiers yet, so whenever those are
used, we end up ignoring them. That's not going to do the right thing in
most cases, so let's reject them instead.

Since d686835171c, the dri2 code tries to create a 0x0 surface without
any format when trying to import. This makes this go from
rendering-issues to asserting in debug builds, making things even worse.

Fixes: d686835171c ("gallium/dri2: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS import")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3654
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7214>
src/gallium/drivers/zink/zink_resource.c