Skip to content

Commit

Permalink
vkd3d: No-op out TRANSFER access on images in EB.
Browse files Browse the repository at this point in the history
They are implicit. Inherits similar behavior from legacy barriers.

Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Sep 6, 2023
1 parent 4be689f commit e1d1029
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/vkd3d/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -13561,6 +13561,10 @@ static void d3d12_command_list_process_enhanced_barrier_texture(struct d3d12_com
vk_transition.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
vk_transition.image = resource->res.vk_image;

/* All COPY operations on images do their own barriers, so we don't have to explicitly flush or invalidate. */
vk_transition.srcAccessMask &= ~(VK_ACCESS_2_TRANSFER_WRITE_BIT | VK_ACCESS_2_TRANSFER_READ_BIT);
vk_transition.dstAccessMask &= ~(VK_ACCESS_2_TRANSFER_WRITE_BIT | VK_ACCESS_2_TRANSFER_READ_BIT);

/* This works like a "deactivating" discard.
* The behavior around UNDEFINED layout in D3D12 is ... not well explained in the docs.
* The basic idea for aliasing seems to be that you should transition to UNDEFINED + NO_ACCESS to "deactivate",
Expand Down

0 comments on commit e1d1029

Please sign in to comment.