27 vk::ImageLayout layout)
const {
29 const auto old_layout =
layout_;
40 vk::ImageMemoryBarrier image_barrier;
41 image_barrier.srcAccessMask = barrier.
src_access;
42 image_barrier.dstAccessMask = barrier.
dst_access;
43 image_barrier.oldLayout = old_layout;
49 image_barrier.subresourceRange.baseMipLevel = 0u;
51 image_barrier.subresourceRange.baseArrayLayer = 0u;
67 framebuffer_ = framebuffer;
72 render_pass_ = render_pass;
TextureSourceVK(TextureDescriptor desc)
void SetCachedRenderPass(const SharedHandleVK< vk::RenderPass > &render_pass)
virtual std::shared_ptr< YUVConversionVK > GetYUVConversion() const
When sampling from textures whose formats are not known to Vulkan, a custom conversion is necessary t...
const TextureDescriptor & GetTextureDescriptor() const
Gets the texture descriptor for this image source.
SharedHandleVK< vk::Framebuffer > GetCachedFramebuffer() const
virtual vk::Image GetImage() const =0
Get the image handle for this texture source.
void SetCachedFramebuffer(const SharedHandleVK< vk::Framebuffer > &framebuffer)
virtual ~TextureSourceVK()
SharedHandleVK< vk::RenderPass > GetCachedRenderPass() const
vk::ImageLayout GetLayout() const
Get the last layout assigned to the TextureSourceVK.
vk::ImageLayout SetLayoutWithoutEncoding(vk::ImageLayout layout) const
Store the layout of the image.
const TextureDescriptor desc_
fml::Status SetLayout(const BarrierVK &barrier) const
Encodes the layout transition barrier to barrier.cmd_buffer for the image.
std::shared_ptr< SharedObjectVKT< T > > SharedHandleVK
constexpr uint32_t ToArrayLayerCount(TextureType type)
constexpr vk::ImageAspectFlags ToImageAspectFlags(PixelFormat format)
Defines an operations and memory access barrier on a resource.
vk::CommandBuffer cmd_buffer
vk::AccessFlags src_access
vk::PipelineStageFlags dst_stage
vk::ImageLayout new_layout
vk::PipelineStageFlags src_stage
vk::AccessFlags dst_access
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
#define VK_QUEUE_FAMILY_IGNORED