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

Page 25 (sampler) fails synchronization validation #341

Open
gelvinp opened this issue Jun 7, 2023 · 0 comments
Open

Page 25 (sampler) fails synchronization validation #341

gelvinp opened this issue Jun 7, 2023 · 0 comments

Comments

@gelvinp
Copy link

gelvinp commented Jun 7, 2023

When I saw the "best practices" validation feature, I also saw that there was a "synchronization validation" feature, so I enabled both. I saw that my project thus far had two errors reported every frame:

validation layer: Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x5c0ec5d6 | vkCmdBeginRenderPass: Hazard WRITE_AFTER_WRITE vs. layout transition in subpass 0 for attachment 0 aspect color during load with loadOp VK_ATTACHMENT_LOAD_OP_CLEAR.
validation layer: Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x5c0ec5d6 | vkCmdEndRenderPass: Hazard WRITE_AFTER_WRITE vs. store/resolve operations in subpass 0 for attachment 0 final image layout transition (old_layout: VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, new_layout: VK_IMAGE_LAYOUT_PRESENT_SRC_KHR).

I copied the source from here exactly as is, and simply added the synchronization validation feature, and found that it also had these errors every frame. I've spent several hours trying to figure out what is happening here, and as far as I know, the VkSubpassDependency should prevent this but also I have absolutely no idea what is going on.

Any thoughts on how to fix this?

(to enable the feature, I added this block in between populateDebugMessengerCreateInfo(...) and createInfo.pNext = ...:

            VkValidationFeatureEnableEXT enabled[] = {
                VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT
            };

            VkValidationFeaturesEXT features{};
            features.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT;
            features.enabledValidationFeatureCount = 1;
            features.pEnabledValidationFeatures = enabled;
            debugCreateInfo.pNext = &features;
@gelvinp gelvinp changed the title Page 25 (sampler) fails synchronozation validation Page 25 (sampler) fails synchronization validation Jun 7, 2023
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

No branches or pull requests

1 participant