Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dylanblokhuis
Copy link
Contributor

@dylanblokhuis dylanblokhuis commented Mar 21, 2025

Fixes #96 - Not sure if this is a good solution, but it removed all validation errors and most examples seem to be working.

Tested on linux with:

apiVersion         = 1.4.305
driverVersion      = 25.0.1
vendorID           = 0x1002
deviceID           = 0x744c
deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName         = AMD Radeon RX 7900 GRE (RADV NAVI31)
driverID           = DRIVER_ID_MESA_RADV
driverName         = radv
driverInfo         = Mesa 25.0.1
conformanceVersion = 1.4.0.0

@attackgoat attackgoat self-requested a review March 22, 2025 19:04
Copy link
Owner

@attackgoat attackgoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified the code so that render passes with multiple subpasses correctly call Image::access(..) for all subpasses, in order, so that the final layout of the image matches the render pass.

Previously the loop was skipping Image::access(..) calls unless it was the first access of that image for the render pass. This change only affects the scenario where an image is, for instance, written as an attachment and then used as input or some other access type within the same render pass.

Overall, I am not sure the behavior we're seeing for AMD on Linux matches the Vulkan spec, because AFAIK the render pass should act as a barrier and so the additional wait on "Nothing" until "Present" is valid given that the render pass waited on "Color Attachment Write". Either way this change isn't wrong or performance-impacting and brings the logic back to where it was before #81, which explicitly barriers on the previous work.

In any case, your diagnosis was correct and greatly helped me review this issue! If it looks good to you I'm ready to merge it and push an updated patch version.

@dylanblokhuis
Copy link
Contributor Author

👍 lgtm, thanks for moving so quickly!

@attackgoat attackgoat merged commit d96b861 into attackgoat:master Mar 23, 2025
3 checks passed
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.

Blackscreen on AMD + Linux (X11 and Wayland)

2 participants