zink: add special-casing for (not) reordering certain image barriers
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 12 May 2023 14:21:31 +0000 (10:21 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 22 May 2023 23:26:44 +0000 (23:26 +0000)
commit9c8b6754b0d8a908b1c09815ff90b42bc7de0bff
tree02be17623d84f582c7c87ea30e07f7ac14775fba
parent03b9a6fde19023c72dc26d209125ddbdb38fb9be
zink: add special-casing for (not) reordering certain image barriers

in a scenario where an ordered read op occurs for an image,
successive read-only barriers SHOULD be able to be promoted

...but they can't, because there isn't yet a mechanism for handling layout
transitions between the unordered cmdbuf and the ordered cmdbuf,
meaning that promoting e.g., a SHADER_READ_ONLY barrier after a TRANSFER_SRC
barrier will leave the image with the wrong layout for the transfer op:

TRANSFER_SRC(unordered) -> COPY(ordered) -> SHADER_READ_ONLY(unordered)

becomes

TRANSFER_SRC(unordered) -> SHADER_READ_ONLY(unordered) -> COPY(ordered)

ideally I'll get around to figuring this out at some point

affects:
dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32i_r32i.texture2d_array_to_renderbuffer

Fixes: bf0af0f8ede ("zink: move all barrier-related functions to c++")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23035>
src/gallium/drivers/zink/zink_synchronization.cpp