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

False negative when trying to blend to undefined framebuffer? #1794

Closed
haasn opened this issue Apr 30, 2020 · 1 comment
Closed

False negative when trying to blend to undefined framebuffer? #1794

haasn opened this issue Apr 30, 2020 · 1 comment
Assignees
Milestone

Comments

@haasn
Copy link
Contributor

haasn commented Apr 30, 2020

I had a bug in my application in which I was trying to blend onto a renderpass attachment that was specified as initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE, which causes the framebuffer contents to be undefined at the time of blending.

It's definitely possible that the layers could have caught the combination of this + blending enabled, either as a hard error (undefined behavior?) or as a best practices check. Although in theory it's possible that the undefined behaviour is hidden if the specifics of the blending end up with the target being completely discarded, in cases where this can be guaranteed the user could definitely be disabling blending.

Side note, it might be possible to generalize this sort of "detect undefined image contents" by adding some sort of verification feature that explicitly initializes image regions by a static "test" pattern whenever they effectively become undefined (e.g. by transitioning out of VK_IMAGE_LAYOUT_UNDEFINED).

@mark-lunarg
Copy link
Contributor

Added to the best-practices tracking issue #24, will track there. Thanks!

@shannon-lunarg shannon-lunarg added this to the sdk-1.2.148.0 milestone Jul 29, 2020
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

3 participants