diff options
author | Chad Versace <[email protected]> | 2015-11-03 14:55:58 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-11-04 15:20:52 -0800 |
commit | a9a3071fc4638f5f86ba846dd114e3383bf1bc17 (patch) | |
tree | 4ac78500829c6d26fac65a8c869a35abb6c45b6e /src/vulkan/anv_meta_clear.h | |
parent | 49c96a14c512b7b56d19c47d384ddcc67941633e (diff) |
anv/meta: Rewrite clear code
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.
Diffstat (limited to 'src/vulkan/anv_meta_clear.h')
-rw-r--r-- | src/vulkan/anv_meta_clear.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vulkan/anv_meta_clear.h b/src/vulkan/anv_meta_clear.h index 4ac71f183f7..e53bd979763 100644 --- a/src/vulkan/anv_meta_clear.h +++ b/src/vulkan/anv_meta_clear.h @@ -30,6 +30,7 @@ extern "C" { struct anv_device; void anv_device_init_meta_clear_state(struct anv_device *device); +void anv_device_finish_meta_clear_state(struct anv_device *device); #ifdef __cplusplus } |