Commit c2aaeadb9debcc12387d7a2c77d1f336e323e990

Lingfeng Yang 2022-07-14T13:27:38

Vulkan: Skip nonexistent attachments when calculating samples When FBO 0 is bound, FramebufferVk can get into a state where the color attachment is considered null (such as surfaceless). Then, getSamples() is called with null color attachment, resulting in an assertion or nullptr crash. Fix getSamples() to respect the color attachments mask. The entry point that brought this about was also a dispatch, not a draw. In a future CL, we should also optimize syncState to not consider draw related state if the task is a dispatch. Also fixes b/234620157 Bug: b/223456677 Change-Id: I8cc969de941f43a2eb66871033d6ec7ddf8b8a66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764435 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Lingfeng Yang <lfy@google.com>