Commit a02fa8a015e55a74d3b3265451d731c0bb57f3ae

Steven Noonan 2022-03-24T22:14:44

Vulkan: mark image contents defined on clear-invalidate-clear The backend was ignoring "repeated clears" with an Invalidate between them, which marked the image contents as undefined. When a clear happens after invalidate, verify that the clear parameters were the same, and simply mark the image contents defined if they aren't already. For example, in this scenario: - glBindFramebuffer(fbo) - glInvalidateFramebuffer(color + depth) - glClear(color + depth) - depth only render - glInvalidateFramebuffer(depth) - glBindFramebuffer(0) The color clear got skipped entirely because it was cleared with that color in a previous frame and no other color draws happened since. This caused sampling from the FBO's texture to return garbage data. Bug: angleproject:7127 Change-Id: I4ffe65c67375931ab63f07f27fa59ed0a4b90cd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551297 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>