Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hazard WRITE_AFTER_WRITE using Secondary Command Buffers #7743

Open
wusikijeronii opened this issue Mar 22, 2024 · 1 comment
Open

Hazard WRITE_AFTER_WRITE using Secondary Command Buffers #7743

wusikijeronii opened this issue Mar 22, 2024 · 1 comment
Assignees
Labels
Synchronization Synchronization Validation Object Issue

Comments

@wusikijeronii
Copy link

Environment:

  • OS: Windows 11 22H2
  • GPU and driver version: NVIDIA GeForce RTX 3050 Laptop. Driver version: 551.86.0.0
  • SDK or header version if building from repo: 1.3.280.0
  • Options enabled (synchronization, best practices, etc.): synchronization

Describe the Issue
The source issue was described on Discourse.
I faced the problem when I used multisubpass and secondary command buffers. I got the Hazard WAW error. Without secondary buffers, I got no errors.
You can familiarize yourself with the example based on VulkanTutorial here.
I received an error about sync image layout, but it is somewhat nonsensical that Store Op could hazard anything (look at the error below).

Additional context

code or terminal output
validation layer: Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x5c0ec5d6 | vkCmdEndRenderPass():  Hazard WRITE_AFTER_WRITE in subpass 1 for attachment 1 color aspect during store with storeOp VK_ATTACHMENT_STORE_OP_DONT_CARE. Access info (usage: SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_WRITE, prior_usage: SYNC_IMAGE_LAYOUT_TRANSITION, write_barriers: SYNC_FRAGMENT_SHADER_INPUT_ATTACHMENT_READ, command: vkCmdNextSubpass, seq_no: 3, subcmd: 1, renderpass: VkRenderPass 0xead9370000000008[], reset_no: 2)
@artem-lunarg artem-lunarg added the Synchronization Synchronization Validation Object Issue label Mar 22, 2024
@artem-lunarg artem-lunarg self-assigned this Mar 29, 2024
@artem-lunarg
Copy link
Contributor

I can build the original sample and reproduce the error. That should be a validation bug. For some reason the layout transition does not synchronizes correctly with the accesses from the secondary command buffer. The net effect that the layout transition detects only accesses after the secondary command buffer (DONT_CARE storeOp writes). Then the system thinks there is a missing synchronization with DONT_CARE access.

Repro cases:
artem-lunarg@6f139ec

The first test reproduces the issue in a single subpass render pass by using LoadOp NONE.
The second test reproduces the same issue in a two subpass scenario, it's more similar to the reported sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Synchronization Synchronization Validation Object Issue
Projects
None yet
Development

No branches or pull requests

2 participants