zink: always insert barriers for general-layout
We need to always have barriers between individual uses of resources in the general-layout, because otherwise a write-cache might not be flushed before the resource is used. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7652>
This commit is contained in:
parent
11ebe2a572
commit
465a48a048
|
@ -351,8 +351,7 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
else {
|
||||
VkImageLayout layout = res->layout;
|
||||
if (layout != VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL &&
|
||||
layout != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL &&
|
||||
layout != VK_IMAGE_LAYOUT_GENERAL) {
|
||||
layout != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
|
||||
transitions[num_transitions++] = res;
|
||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
}
|
||||
|
|
|
@ -684,7 +684,6 @@ zink_resource_setup_transfer_layouts(struct zink_batch *batch, struct zink_resou
|
|||
* VK_IMAGE_LAYOUT_GENERAL. And since this isn't a present-related
|
||||
* operation, VK_IMAGE_LAYOUT_GENERAL seems most appropriate.
|
||||
*/
|
||||
if (src->layout != VK_IMAGE_LAYOUT_GENERAL)
|
||||
zink_resource_barrier(batch->cmdbuf, src, src->aspect,
|
||||
VK_IMAGE_LAYOUT_GENERAL);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue