#include <texture_source_vk.h>
Public Member Functions | |
| virtual | ~TextureSourceVK () |
| const TextureDescriptor & | GetTextureDescriptor () const |
| virtual vk::Image | GetImage () const =0 |
| virtual vk::ImageView | GetImageView () const =0 |
| fml::Status | SetLayout (const BarrierVK &barrier) const |
| vk::ImageLayout | SetLayoutWithoutEncoding (vk::ImageLayout layout) const |
| vk::ImageLayout | GetLayout () const |
Protected Member Functions | |
| TextureSourceVK (TextureDescriptor desc) | |
Protected Attributes | |
| const TextureDescriptor | desc_ |
Abstract base class that represents a vkImage and an vkImageView.
This is intended to be used with an impeller::TextureVK. Example implementations represent swapchain images or uploaded textures.
Definition at line 21 of file texture_source_vk.h.
|
virtualdefault |
|
explicitprotected |
Definition at line 9 of file texture_source_vk.cc.
|
pure virtual |
Implemented in impeller::AllocatedTextureSourceVK, and impeller::SwapchainImageVK.
Referenced by SetLayout().
|
pure virtual |
Implemented in impeller::AllocatedTextureSourceVK, and impeller::SwapchainImageVK.
| vk::ImageLayout impeller::TextureSourceVK::GetLayout | ( | ) | const |
Get the last layout assigned to the TextureSourceVK.
This value is synchronized with the GPU via SetLayout so it may not reflect the actual layout.
Definition at line 17 of file texture_source_vk.cc.
| const TextureDescriptor & impeller::TextureSourceVK::GetTextureDescriptor | ( | ) | const |
| fml::Status impeller::TextureSourceVK::SetLayout | ( | const BarrierVK & | barrier | ) | const |
Encodes the layout transition barrier to barrier.cmd_buffer for the image.
The transition is from the layout stored via SetLayoutWithoutEncoding to barrier.new_layout.
Definition at line 30 of file texture_source_vk.cc.
References impeller::BarrierVK::cmd_buffer, desc_, impeller::BarrierVK::dst_access, impeller::BarrierVK::dst_stage, impeller::TextureDescriptor::format, GetImage(), impeller::TextureDescriptor::mip_count, impeller::BarrierVK::new_layout, SetLayoutWithoutEncoding(), impeller::BarrierVK::src_access, impeller::BarrierVK::src_stage, impeller::ToArrayLayerCount(), impeller::ToImageAspectFlags(), and impeller::TextureDescriptor::type.
| vk::ImageLayout impeller::TextureSourceVK::SetLayoutWithoutEncoding | ( | vk::ImageLayout | layout | ) | const |
Store the layout of the image.
This just is bookkeeping on the CPU, to actually set the layout use SetLayout.
| layout | The new layout. |
Definition at line 22 of file texture_source_vk.cc.
Referenced by SetLayout().
|
protected |
Definition at line 54 of file texture_source_vk.h.
Referenced by impeller::SwapchainImageVK::GetPixelFormat(), impeller::SwapchainImageVK::GetSize(), GetTextureDescriptor(), and SetLayout().