Skip to content

vkcube synchronization issues #1162

@ziga-lunarg

Description

@ziga-lunarg

Running vkcube with synchronization enabled in validation layers gives:

Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] | MessageID = 0x5c0ec5d6
vkCmdBeginRenderPass(): WRITE_AFTER_WRITE hazard detected: attachment loadOp access is not synchronized with the attachment layout transition. vkCmdBeginRenderPass clears the depth aspect of attachment 1 (VkImageView 0x260000000026) in subpass 0 of VkRenderPass 0xd000000000d (loadOp VK_ATTACHMENT_LOAD_OP_CLEAR), which was previously written during an image layout transition initiated by the same command. 
The current synchronization allows VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT, but to prevent this hazard, it must allow VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT.
Objects: 1
    [0] VkRenderPass 0xd000000000d


Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] | MessageID = 0x5c0ec5d6
vkCmdBeginRenderPass(): WRITE_AFTER_WRITE hazard detected: attachment loadOp access is not synchronized with the attachment layout transition. vkCmdBeginRenderPass clears the depth aspect of attachment 1 (VkImageView 0x260000000026) in subpass 0 of VkRenderPass 0xd000000000d (loadOp VK_ATTACHMENT_LOAD_OP_CLEAR), which was previously written during an image layout transition initiated by the same command. 
The current synchronization allows VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT, but to prevent this hazard, it must allow VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT.
Objects: 1
    [0] VkRenderPass 0xd000000000d

Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] | MessageID = 0x5c0ec5d6
vkQueueSubmit(): WRITE_AFTER_WRITE hazard detected. vkCmdBeginRenderPass (from VkCommandBuffer 0x267cb00e610 submitted on the current VkQueue 0x267cab003d0) writes to resource, which was previously written by vkCmdEndRenderPass (from VkCommandBuffer 0x267cb00bc50 submitted on VkQueue 0x267cab003d0). 
No sufficient synchronization is present to ensure that a layout transition does not conflict with a prior write (VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT) at VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT.
Objects: 2
    [0] VkQueue 0x267cab003d0
    [1] VkCommandBuffer 0x267cb00e610

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions