diff options
author | Chad Versace <[email protected]> | 2016-01-13 18:37:27 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-01-14 22:53:05 -0800 |
commit | e4b17a2e1a9f1b8536bed6faca9d8e62483fab35 (patch) | |
tree | de5e0dde87da4bd0559dd0a1344ec3ebdd3af32c /src/vulkan/anv_meta_clear.c | |
parent | 0038ae2e4a6f177da076a9b2f10944d54bc9289e (diff) |
anv/meta: Implement vkCmdClearAttachments
Diffstat (limited to 'src/vulkan/anv_meta_clear.c')
-rw-r--r-- | src/vulkan/anv_meta_clear.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/vulkan/anv_meta_clear.c b/src/vulkan/anv_meta_clear.c index 722751cda80..b7f2f18b994 100644 --- a/src/vulkan/anv_meta_clear.c +++ b/src/vulkan/anv_meta_clear.c @@ -933,5 +933,19 @@ void anv_CmdClearAttachments( uint32_t rectCount, const VkClearRect* pRects) { - stub(); + ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer); + struct anv_meta_saved_state saved_state; + + meta_clear_begin(&saved_state, cmd_buffer); + + /* FINISHME: We can do better than this dumb loop. It thrashes too much + * state. + */ + for (uint32_t a = 0; a < attachmentCount; ++a) { + for (uint32_t r = 0; r < rectCount; ++r) { + emit_clear(cmd_buffer, &pAttachments[a], &pRects[r]); + } + } + + meta_clear_end(&saved_state, cmd_buffer); } |