OSDN Git Service

Support for clearing Framebuffer attachments
authorAlexis Hetu <sugoi@google.com>
Thu, 17 Jan 2019 22:14:57 +0000 (17:14 -0500)
committerAlexis Hétu <sugoi@google.com>
Fri, 25 Jan 2019 23:04:14 +0000 (23:04 +0000)
commit1cd31ea144384a45d5d2ebfd20565d82b9b2a7d6
tree6cb5247c50b5e9591d03aae17d7e21c14256f3d1
parent238af1553168ab7a8542275c35245905b080b5f7
Support for clearing Framebuffer attachments

This is the implementation for vkCmdClearAttachments.

It includes the new command along with the plumbing to
get the information to the Image clear function.

The only non trivial behavior here is that the provided
baseArrayLayer for the clear command is to be offset by
the ImageView's subresourceRange's baseArrayLayer so
that it clears the correct layers.

Bug b/119621736

Passes all tests in:
api.image_clearing.dedicated_allocation.clear_color_attachment.*

Change-Id: I19f86b63239ca2fb4d53f2c6c9cb75185794f061
Reviewed-on: https://swiftshader-review.googlesource.com/c/23748
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/Vulkan/VkCommandBuffer.cpp
src/Vulkan/VkCommandBuffer.hpp
src/Vulkan/VkFramebuffer.cpp
src/Vulkan/VkFramebuffer.hpp
src/Vulkan/VkImageView.cpp
src/Vulkan/VkImageView.hpp