![]() |
Plasma Engine
2.0
|
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 |
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.
pTexture | The texture whose image's layout is to be changed. |
dstLayout | The layout that the image is to be changed into. |
dstStages | In what stages the image needs to be in the new layout. |
dstAccess | What access we will be doing on the image in dstStages. |
bDiscardSource | Discard the previous layout, replaces current layout with unknown. |
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.
pTexture | The texture whose image the initial state should be set on. |
dstLayout | The layout that the image currently is in. |
dstStages | In what stage the image was changed into the current layout. |
dstAccess | The access operation that changed the image into the current layout during dstStages. |