KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

VL not reporting when a VkSubpassDependency is needed in a downsampling pass #2591

Open aguaviva opened 6 years ago

aguaviva commented 6 years ago

This happened when generating all mipmap chain elements from a specific render target. This requires a series of back to back passes where the COLOR_ATTACHMENT_OPTIMAL of the current pass becomes the SHADER_READ_ONLY_OPTIMAL of the next.

I will update the bug as soon as I can attach a repro case.

aguaviva commented 6 years ago

Hi Mark, what is the best way to provide you a repro case (I wouldnt want to make it public right now), if you have a way I can provide you the repro case right now.

mark-lunarg commented 6 years ago

@aguaviva, if it it is not too large, you can email it directly to mark@lunarg. If too big for email, I can arrange something on LunarXchange.

aguaviva commented 6 years ago

sure, let's use the LunarXchange thing

mark-lunarg commented 6 years ago

@aguaviva, to generate the invite, I'll need a valid email address from you. If you're uncomfortable including that here you can email it directly to me.

mark-lunarg commented 6 years ago

For tracking, including some side-band information applicable to the issue:

Raul kindly provided a repro case, I have this squirreled away on LunarShare for anyone that needs/wants it. Accompanying information:

I just uploaded a repro case, it comes with 3 exes.

The validation layer doesn’t report any errors at any point. I’d be great if it would because this is a rather tricky bit and I was able to fix it only thanks to the help of a driver engineer. The corruption happens during a bloom pass, this pass does the following:

All those passes have in common that the Color_attachment_write of one draw becomes a shader_read_texture_read of the next draw.

The corruption also shows up if you disable the upscaling in the UI but leave “Blur Bloom Stages” enabled. That should show corruption in the mip #2 and the rest should be black (although with corruption YMMV)

Please let me know if you need any additional help. Cheers

chrisforbes commented 6 years ago

@mark-lunarg can you share how this downsample and blur are being achieved in terms of renderpass/subpass structure? This is tripping my spidey-sense.

aguaviva commented 6 years ago

I just sent you in a private email the source code that causes the issue.

chrisforbes commented 6 years ago

@aguaviva if that was directed at me, the mail didn't show up...

mark-lunarg commented 6 years ago

@chrisforbes, I have the email. If @aguaviva says it's OK I will forward it, or he can resend it to you. Either way, I am swamped for the next week or so (sorry!).