Commit bcb678a5ed444d752eb2fb520891f0d59ce1a676

Shahbaz Youssefi 2021-05-27T16:50:55

Vulkan: Fix deferred clears vs 3D textures Two bugs are fixed in this change. One is that framebuffer attachments to 3D textures should not attempt to defer clears. The clear staged for the 3D texture applies to all slices, not just the slice the framebuffer is attached to (and that would get cleared through deferred clears). Secondly, when clearing an attachment to a 3D texture, the clear must be applied immediately through a render pass loadOp to affect only the slice that's attached. This was already handled for layered framebuffers where the clear was applied immediately if the 3D texture render target had more layers than the framebuffer. The condition for this is generalized to check whether the 3D texture has more slices (regardless of whether the render target is layered or not). Test is based on one written by Austin Eng <enga@chromium.org> Bug: angleproject:5967 Change-Id: I43cf5fc24673323eda8390021641e2238be6e375 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2923785 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>