Plasma Engine  2.0
Loading...
Searching...
No Matches
plPipelineBarrierVulkan Class Reference

Public Member Functions

 plPipelineBarrierVulkan (plAllocator *pAllocator)
 
Barrier handling
void SetCommandBuffer (vk::CommandBuffer *pCommandBuffer)
 Set the active command buffer that barriers are flushed into.
 
void Flush ()
 Flush accumulated changes as a barrier into the active command buffer.
 
void Submit ()
 Should be called when the active command buffer is submitted. This clear various states as a submit works like a full barrier.
 
void FullBarrier ()
 Full barrier for debugging purposes.
 
bool IsDirty () const
 
Buffer handling
void BufferDestroyed (const plGALBufferVulkan *pBuffer)
 Need to be called to remove the buffer from tracking.
 
void AccessBuffer (const plGALBufferVulkan *pBuffer, vk::DeviceSize offset, vk::DeviceSize length, vk::PipelineStageFlags srcStages, vk::AccessFlags srcAccess, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess)
 
bool IsDirty (vk::Buffer buffer, vk::DeviceSize offset, vk::DeviceSize length, vk::AccessFlags dstAccess)
 
Image handling
void SetInitialImageState (const plGALTextureVulkan *pTexture, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages=vk::PipelineStageFlagBits::eTopOfPipe, vk::AccessFlags dstAccess={})
 Force, sets the layout of the texture's image. Most images are not created in their preferred layout on creation.
 
void TextureDestroyed (const plGALTextureVulkan *pTexture)
 Need to be called to remove the texture's image from tracking.
 
void EnsureImageLayout (const plGALTextureVulkan *pTexture, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false)
 Transition the given texture's image into the given layout to be used in the given stage.
 
void EnsureImageLayout (const plGALRenderTargetViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false)
 
void EnsureImageLayout (const plGALTextureResourceViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false)
 
void EnsureImageLayout (const plGALTextureUnorderedAccessViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false)
 
void EnsureImageLayout (const plGALTextureVulkan *pTexture, vk::ImageSubresourceRange subResources, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false)
 
bool IsDirty (vk::Image image, const vk::ImageSubresourceRange &subResources) const
 

Member Function Documentation

◆ EnsureImageLayout()

void plPipelineBarrierVulkan::EnsureImageLayout ( const plGALTextureVulkan * pTexture,
vk::ImageLayout dstLayout,
vk::PipelineStageFlags dstStages,
vk::AccessFlags dstAccess,
bool bDiscardSource = false )

Transition the given texture's image into the given layout to be used in the given stage.

Parameters
pTextureThe texture whose image's layout is to be changed.
dstLayoutThe layout that the image is to be changed into.
dstStagesIn what stages the image needs to be in the new layout.
dstAccessWhat access we will be doing on the image in dstStages.
bDiscardSourceDiscard the previous layout, replaces current layout with unknown.

◆ SetInitialImageState()

void plPipelineBarrierVulkan::SetInitialImageState ( const plGALTextureVulkan * pTexture,
vk::ImageLayout dstLayout,
vk::PipelineStageFlags dstStages = vk::PipelineStageFlagBits::eTopOfPipe,
vk::AccessFlags dstAccess = {} )

Force, sets the layout of the texture's image. Most images are not created in their preferred layout on creation.

Parameters
pTextureThe texture whose image the initial state should be set on.
dstLayoutThe layout that the image currently is in.
dstStagesIn what stage the image was changed into the current layout.
dstAccessThe access operation that changed the image into the current layout during dstStages.

The documentation for this class was generated from the following files: