Plasma Engine  2.0
Loading...
Searching...
No Matches
plGALSharedTextureVulkan Class Reference
Inheritance diagram for plGALSharedTextureVulkan:

Protected Member Functions

 plGALSharedTextureVulkan (const plGALTextureCreationDescription &Description, plEnum< plGALSharedTextureType > sharedType, plGALPlatformSharedHandle hSharedHandle)
 
virtual plResult InitPlatform (plGALDevice *pDevice, plArrayPtr< plGALSystemMemoryDescription > pInitialData) override
 
virtual plResult DeInitPlatform (plGALDevice *pDevice) override
 
virtual plGALPlatformSharedHandle GetSharedHandle () const override
 Returns the handle that can be used to open this texture on another device / process. Call plGALDevice::OpenSharedTexture to do so.
 
virtual void WaitSemaphoreGPU (plUInt64 uiValue) const override
 Before the current render pipeline is executed, the GPU will wait for the semaphore to have the given value.
 
virtual void SignalSemaphoreGPU (plUInt64 uiValue) const override
 Once the current render pipeline is done on the GPU, the semaphore will be signaled with the given value.
 
- Protected Member Functions inherited from plGALTextureVulkan
 plGALTextureVulkan (const plGALTextureCreationDescription &Description, bool bLinearCPU, bool bStaging)
 
virtual void SetDebugNamePlatform (const char *szName) const override
 
plResult CreateStagingBuffer (const vk::ImageCreateInfo &createInfo)
 
- Protected Member Functions inherited from plGALTexture
 plGALTexture (const plGALTextureCreationDescription &Description)
 

Protected Attributes

plEnum< plGALSharedTextureTypem_SharedType = plGALSharedTextureType::None
 
plGALPlatformSharedHandle m_hSharedHandle
 
vk::Semaphore m_SharedSemaphore
 
- Protected Attributes inherited from plGALTextureVulkan
vk::Image m_image
 
vk::Format m_imageFormat = vk::Format::eUndefined
 
vk::ImageLayout m_preferredLayout = vk::ImageLayout::eUndefined
 
vk::PipelineStageFlags m_stages = {}
 
vk::AccessFlags m_access = {}
 
plVulkanAllocation m_alloc = nullptr
 
plVulkanAllocationInfo m_allocInfo
 
plGALDeviceVulkanm_pDevice = nullptr
 
bool m_bLinearCPU = false
 
bool m_bStaging = false
 
StagingMode m_stagingMode = StagingMode::None
 
plGALTextureHandle m_hStagingTexture
 
plGALBufferHandle m_hStagingBuffer
 
- Protected Attributes inherited from plGALTexture
plGALTextureResourceViewHandle m_hDefaultResourceView
 
plGALRenderTargetViewHandle m_hDefaultRenderTargetView
 
plHashTable< plUInt32, plGALTextureResourceViewHandlem_ResourceViews
 
plHashTable< plUInt32, plGALRenderTargetViewHandlem_RenderTargetViews
 
plHashTable< plUInt32, plGALTextureUnorderedAccessViewHandlem_UnorderedAccessViews
 
- Protected Attributes inherited from plGALResource< plGALTextureCreationDescription >
const plGALTextureCreationDescription m_Description
 

Friends

class plGALDeviceVulkan
 
class plMemoryUtils
 

Additional Inherited Members

- Public Types inherited from plGALTextureVulkan
enum class  StagingMode : plUInt8 { None , Buffer , Texture , TextureAndBuffer }
 
- Public Member Functions inherited from plGALTextureVulkan
PL_ALWAYS_INLINE vk::Image GetImage () const
 
PL_ALWAYS_INLINE vk::Format GetImageFormat () const
 
PL_ALWAYS_INLINE vk::ImageLayout GetPreferredLayout () const
 
PL_ALWAYS_INLINE vk::ImageLayout GetPreferredLayout (vk::ImageLayout targetLayout) const
 
PL_ALWAYS_INLINE vk::PipelineStageFlags GetUsedByPipelineStage () const
 
PL_ALWAYS_INLINE vk::AccessFlags GetAccessMask () const
 
PL_ALWAYS_INLINE plVulkanAllocation GetAllocation () const
 
PL_ALWAYS_INLINE const plVulkanAllocationInfoGetAllocationInfo () const
 
PL_ALWAYS_INLINE bool IsLinearLayout () const
 
vk::Extent3D GetMipLevelSize (plUInt32 uiMipLevel) const
 
vk::ImageSubresourceRange GetFullRange () const
 
vk::ImageAspectFlags GetAspectMask () const
 
PL_ALWAYS_INLINE StagingMode GetStagingMode () const
 
PL_ALWAYS_INLINE plGALTextureHandle GetStagingTexture () const
 
PL_ALWAYS_INLINE plGALBufferHandle GetStagingBuffer () const
 
plUInt32 ComputeSubResourceOffsets (plDynamicArray< SubResourceOffset > &out_subResourceOffsets) const
 
- Public Member Functions inherited from plGALResource< plGALTextureCreationDescription >
PL_ALWAYS_INLINE plGALResource (const plGALTextureCreationDescription &description)
 
PL_ALWAYS_INLINE const plGALTextureCreationDescriptionGetDescription () const
 
- Public Member Functions inherited from plGALResourceBase
void SetDebugName (const char *szName) const
 
virtual const plGALResourceBaseGetParentResource () const
 
- Public Member Functions inherited from plRefCounted
virtual ~plRefCounted ()=default
 Adds a virtual destructor.
 
- Public Member Functions inherited from plRefCountingImpl
 plRefCountingImpl ()=default
 Constructor.
 
 plRefCountingImpl (const plRefCountingImpl &rhs)
 
void operator= (const plRefCountingImpl &rhs)
 
plInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
 
plInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
plInt32 GetRefCount () const
 Returns the current reference count.
 
- Static Protected Member Functions inherited from plGALTextureVulkan
static vk::Format ComputeImageFormat (plGALDeviceVulkan *pDevice, plEnum< plGALResourceFormat > galFormat, vk::ImageCreateInfo &ref_createInfo, vk::ImageFormatListCreateInfo &ref_imageFormats, bool bStaging)
 
static void ComputeCreateInfo (plGALDeviceVulkan *pDevice, const plGALTextureCreationDescription &description, vk::ImageCreateInfo &ref_createInfo, vk::PipelineStageFlags &ref_stages, vk::AccessFlags &ref_access, vk::ImageLayout &ref_preferredLayout)
 
static void ComputeCreateInfoLinear (vk::ImageCreateInfo &ref_createInfo, vk::PipelineStageFlags &ref_stages, vk::AccessFlags &ref_access)
 
static void ComputeAllocInfo (bool bLinearCPU, plVulkanAllocationCreateInfo &ref_allocInfo)
 
static StagingMode ComputeStagingMode (plGALDeviceVulkan *pDevice, const plGALTextureCreationDescription &description, const vk::ImageCreateInfo &createInfo)
 

Member Function Documentation

◆ DeInitPlatform()

plResult plGALSharedTextureVulkan::DeInitPlatform ( plGALDevice * pDevice)
overrideprotectedvirtual

Reimplemented from plGALTextureVulkan.

◆ GetSharedHandle()

plGALPlatformSharedHandle plGALSharedTextureVulkan::GetSharedHandle ( ) const
overrideprotectedvirtual

Returns the handle that can be used to open this texture on another device / process. Call plGALDevice::OpenSharedTexture to do so.

Implements plGALSharedTexture.

◆ InitPlatform()

plResult plGALSharedTextureVulkan::InitPlatform ( plGALDevice * pDevice,
plArrayPtr< plGALSystemMemoryDescription > pInitialData )
overrideprotectedvirtual

Reimplemented from plGALTextureVulkan.

◆ SignalSemaphoreGPU()

void plGALSharedTextureVulkan::SignalSemaphoreGPU ( plUInt64 uiValue) const
overrideprotectedvirtual

Once the current render pipeline is done on the GPU, the semaphore will be signaled with the given value.

Parameters
iValueValue the semaphore is set to once we are done using the texture (after the current render pipeline).

Implements plGALSharedTexture.

◆ WaitSemaphoreGPU()

void plGALSharedTextureVulkan::WaitSemaphoreGPU ( plUInt64 uiValue) const
overrideprotectedvirtual

Before the current render pipeline is executed, the GPU will wait for the semaphore to have the given value.

Parameters
iValueValue the semaphore needs to have before the texture can be used.

Implements plGALSharedTexture.


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