![]() |
ezEngine
Release 25.03
|
Public Member Functions | |
ezPipelineBarrierVulkan (ezAllocator *pAllocator) | |
bool | AddBufferBarrierInternal (vk::Buffer buffer, vk::DeviceSize offset, vk::DeviceSize length, vk::PipelineStageFlags srcStages, vk::AccessFlags srcAccess, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess) |
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 ezGALBufferVulkan *pBuffer) |
Need to be called to remove the buffer from tracking. | |
void | AccessBuffer (const ezGALBufferVulkan *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 ezGALTextureVulkan *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. More... | |
void | TextureDestroyed (const ezGALTextureVulkan *pTexture) |
Need to be called to remove the texture's image from tracking. | |
void | EnsureImageLayout (const ezGALTextureVulkan *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. More... | |
void | EnsureImageLayout (const ezGALRenderTargetViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false) |
void | EnsureImageLayout (const ezGALTextureResourceViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false) |
void | EnsureImageLayout (const ezGALTextureUnorderedAccessViewVulkan *pTextureView, vk::ImageLayout dstLayout, vk::PipelineStageFlags dstStages, vk::AccessFlags dstAccess, bool bDiscardSource=false) |
void | EnsureImageLayout (const ezGALTextureVulkan *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 ezPipelineBarrierVulkan::EnsureImageLayout | ( | const ezGALTextureVulkan * | 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 ezPipelineBarrierVulkan::SetInitialImageState | ( | const ezGALTextureVulkan * | 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. |