Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

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

Open
aguaviva opened this issue Apr 18, 2018 · 9 comments
Assignees
Milestone

Comments

@aguaviva
Copy link

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.

@mark-lunarg mark-lunarg self-assigned this Apr 18, 2018
@mark-lunarg mark-lunarg added this to the P1 milestone Apr 18, 2018
@aguaviva
Copy link
Author

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
Copy link
Collaborator

@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
Copy link
Author

sure, let's use the LunarXchange thing

@mark-lunarg
Copy link
Collaborator

@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
Copy link
Collaborator

mark-lunarg commented Apr 27, 2018

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.

  • SampleVK_0_subpass.exe, this exe doesn’t use any subpasses and it shows corruption on AMD
  • SampleVK_1_subpass.exe, this exe uses 1 subpass and works fine on AMD but shows corruption on NV
  • SampleVK_2_subpass.exe, this exe uses 2 subpasses and works fine on both AMD and NV

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:

  • Downsampling: Generates 5 mip levels of the main rendertarget.
  • Blur: Does a separable blurs to every mip element.
  • Upscaling: Starting from the smallest mip, blends it with the upper mip level using a weight.

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
Copy link
Collaborator

@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
Copy link
Author

aguaviva commented May 4, 2018

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

@chrisforbes
Copy link
Collaborator

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

@mark-lunarg
Copy link
Collaborator

@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!).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants