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

Fix depth buffer sync #392

Merged
merged 2 commits into from
May 5, 2024
Merged

Fix depth buffer sync #392

merged 2 commits into from
May 5, 2024

Conversation

Ralith
Copy link
Owner

@Ralith Ralith commented May 5, 2024

These account for one of the errors reported in #390. I don't see the others on my laptop, but I may try another machine.

@Ralith Ralith enabled auto-merge (rebase) May 5, 2024 02:53
@patowen
Copy link
Collaborator

patowen commented May 5, 2024

On my machine, on this branch, I get the following sync validation errors:
Validation Error: [ SYNC-HAZARD-READ-AFTER-WRITE ] Object 0: handle = 0x2a7f70000000053, name = surface extraction params, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xe4d96472 | vkCmdDispatch(): Hazard READ_AFTER_WRITE for VkBuffer 0x2a7f70000000053[surface extraction params] in VkCommandBuffer 0x22f28a14900[post-frame], VkPipeline 0x72303f0000000052[extract], and VkDescriptorSet 0x854315000000025c[], type: VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, binding #0 index 0. Access info (usage: SYNC_COMPUTE_SHADER_UNIFORM_READ, prior_usage: SYNC_CLEAR_TRANSFER_WRITE, write_barriers: SYNC_COMPUTE_SHADER_SHADER_BINDING_TABLE_READ|SYNC_COMPUTE_SHADER_SHADER_SAMPLED_READ|SYNC_COMPUTE_SHADER_SHADER_STORAGE_READ, command: vkCmdUpdateBuffer, seq_no: 1, reset_no: 1). id=SYNC-HAZARD-READ-AFTER-WRITE number=-455515022 queue_labels= cmd_labels= objects=BUFFER 2a7f70000000053 SYNC-HAZARD-READ-AFTER-WRITE

ERROR Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0x59ffe0000000003d, name = indirect, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x5c0ec5d6 | vkCmdDispatch(): Hazard WRITE_AFTER_WRITE for VkBuffer 0x59ffe0000000003d[indirect] in VkCommandBuffer 0x22f28a14900[post-frame], VkPipeline 0x72303f0000000052[extract], and VkDescriptorSet 0x363e11000000025b[], type: VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, binding #2 index 0. Access info (usage: SYNC_COMPUTE_SHADER_SHADER_STORAGE_WRITE, prior_usage: SYNC_CLEAR_TRANSFER_WRITE, write_barriers: SYNC_COMPUTE_SHADER_SHADER_BINDING_TABLE_READ|SYNC_COMPUTE_SHADER_SHADER_SAMPLED_READ|SYNC_COMPUTE_SHADER_SHADER_STORAGE_READ, command: vkCmdUpdateBuffer, seq_no: 5, reset_no: 1). id=SYNC-HAZARD-WRITE-AFTER-WRITE number=1544472022 queue_labels= cmd_labels= objects=BUFFER 59ffe0000000003d SYNC-HAZARD-WRITE-AFTER-WRITE

ERROR Validation Error: [ SYNC-HAZARD-WRITE-AFTER-READ ] Object 0: handle = 0x22f24099f50, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x376bc9df | vkQueueSubmit(): Hazard WRITE_AFTER_READ for entry 0, VkCommandBuffer 0x22f28a18900[post-frame], Submitted access info (submitted_usage: SYNC_CLEAR_TRANSFER_WRITE, command: vkCmdUpdateBuffer, seq_no: 1, reset_no: 1). Access info (prior_usage: SYNC_COMPUTE_SHADER_UNIFORM_READ, read_barriers: VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT|VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT|VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT|VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT|VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT|VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT|VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT|VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT|VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT|VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT|VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT|VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR|VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR|VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT|VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT|VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, queue: VkQueue 0x22f24099f50[], submit: 1, batch: 1, batch_tag: 18, command: vkCmdDispatch, command_buffer: VkCommandBuffer 0x22f28a14900[post-frame], seq_no: 67, reset_no: 1). id=SYNC-HAZARD-WRITE-AFTER-READ number=929810911 queue_labels= cmd_labels= objects=QUEUE 22f24099f50

I believe those are all the unique errors I get. This seems fewer than before, so it works as a partial fix on my end as well.

Thanks for looking into this!

@Ralith Ralith merged commit 00ef28a into master May 5, 2024
6 checks passed
@Ralith Ralith deleted the fix-sync branch May 5, 2024 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants