KhronosGroup / KhronosGroup/Vulkan-Docs

Write Racing Write in Transfer->Graphics Queue Example

Open
#2,683 0 comments 0 reactions 1 assignee Claimed by @Tobski View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

Hi!

If I follow the example of uploading an image on a separate queue family before transferring to a family supporting graphics, exactly as given*, I get the following validation warning:

>Validation Error: [ SYNC-HAZARD-WRITE-RACING-WRITE ] | MessageID = 0x743c6069
vkQueueSubmit2(): WRITE_RACING_WRITE hazard detected. vkCmdPipelineBarrier2 (from VkCommandBuffer 0x7f3228eaf040 submitted on the current VkQueue 0x7f3231679a30) writes to VkImage 0x360000000036, which was previously written during an image layout transition initiated by another vkCmdPipelineBarrier2 command (from VkCommandBuffer 0x7f322740a010 submitted on VkQueue 0x7f323167dd28).
No sufficient synchronization is present to ensure that a layout transition does not conflict with a prior layout transition.

I suspect this might be a bug in the validation layers but I thought I would ask here first.

Example: https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples#upload-data-from-the-cpu-to-an-image-sampled-in-a-fragment-shader

_*_ The `dstAccessMask` on the `preCopyMemoryBarrier` should be changed to `VK_ACCESS_2_TRANSFER_WRITE_BIT` at least as far as the validation layers are concerned.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.