summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_meta_clear.h
Commit message (Collapse)AuthorAgeFilesLines
* anv/meta: Rewrite clear codeChad Versace2015-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Crucible test "func.clear.load-clear.attachments-8". The old clear code, when clearing attachments for VK_ATTACHMENT_LOAD_OP_CLEAR, suffered from some fundamental bugs. The bugs were not fixable with the old code's approach. - It assumed that a VkRenderPass contained at most one depthstencil attachment. - It tried to clear all attachments (color and the sole depthstencil) with a single instanced draw call, using the VUE header's RenderTargetArrayIndex to specify the instance's target color attachment. But the RenderTargetArrayIndex does not select entries in the binding table; it only selects an array index of a singled layered surface. - If at least one attachment of VkRenderPass had VK_ATTACHMENT_LOAD_OP_CLEAR, then the old code cleared *all* attachments. This was a consequence of using a single draw call and single pipeline for the clear. The new clear code fixes those bugs by making a separate draw call for each attachment, and using one pipeline when clearing color attachments and a different pipeline for depth attachments. The new code, like the old code, does not clear stencil attachments. It is left as a FINISHME.
* anv: Move meta clear code to new file anv_meta_clear.cChad Versace2015-11-041-0/+36
anv_meta.c currently handles blits, copies, clears, and resolves. The clear code is about to grow, and anv_meta.c is already busting at the seams.