OSDN Git Service

Replace uses of sw::Surface with vk::ImageView in the Renderer
authorAlexis Hetu <sugoi@google.com>
Tue, 26 Feb 2019 19:42:36 +0000 (14:42 -0500)
committerAlexis Hétu <sugoi@google.com>
Tue, 26 Feb 2019 20:15:32 +0000 (20:15 +0000)
commit6159a85688beca7e39559491f0a50e7d8ae1d4a0
treea1cd0a97f606cf8668c2ed25bc55f65fa8d95d27
parentfe3d4978886bbbedf5b9c91dd2a539fcf3404455
Replace uses of sw::Surface with vk::ImageView in the Renderer

sw::Surface contains a locking mechanism which is no longer required
in Vulkan. The app is now responsible for making sure the lifetime of
the objects is long enough for the driver to be able to use them in
any operation where they are required.

A few shortcuts were taken here:
- ImageView::getSampleCount() currently always returns the largest
  available sample count.
- ImageView::subresourceRange.levelCount is not taken into account
- Context::getMultiSampleCount() still uses attachment 0 to get
  the samples count, which may be incorrect.

Bug b/118619338

Change-Id: I8cd49926a1537c0f2bc20e6516f12d7de67d6c65
Reviewed-on: https://swiftshader-review.googlesource.com/c/25588
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/Device/Context.cpp
src/Device/Context.hpp
src/Device/PixelProcessor.cpp
src/Device/PixelProcessor.hpp
src/Device/Renderer.cpp
src/Device/Renderer.hpp
src/Vulkan/VkCommandBuffer.cpp
src/Vulkan/VkImage.hpp
src/Vulkan/VkImageView.cpp
src/Vulkan/VkImageView.hpp