MythTV  master
Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MythRenderVulkan Class Reference

#include <libmythui/vulkan/mythrendervulkan.h>

Inheritance diagram for MythRenderVulkan:
[legend]
Collaboration diagram for MythRenderVulkan:
[legend]

Signals

void DoFreeResources (void)
 
void PhysicalDeviceLost (void)
 
void LogicalDeviceLost (void)
 

Public Member Functions

 MythRenderVulkan ()
 
 ~MythRenderVulkan () override
 
void SetVulkanWindow (MythWindowVulkan *VulkanWindow)
 
MythWindowVulkanGetVulkanWindow (void)
 
void SetFrameExpected (void)
 
bool GetFrameExpected (void) const
 
bool GetFrameStarted (void) const
 
void EndFrame (void)
 
QStringList GetDescription (void) override
 
void preInitResources (void) override
 
void initResources (void) override
 
void initSwapChainResources (void) override
 
void releaseSwapChainResources (void) override
 
void releaseResources (void) override
 
void startNextFrame (void) override
 
void physicalDeviceLost (void) override
 
void logicalDeviceLost (void) override
 
void BeginDebugRegion (VkCommandBuffer CommandBuffer, const char *Name, MythVulkan4F Color)
 
void EndDebugRegion (VkCommandBuffer CommandBuffer)
 
bool CreateImage (QSize Size, VkFormat Format, VkImageTiling Tiling, VkImageUsageFlags Usage, VkMemoryPropertyFlags Properties, VkImage &Image, VkDeviceMemory &ImageMemory)
 
void TransitionImageLayout (VkImage &Image, VkImageLayout OldLayout, VkImageLayout NewLayout, VkCommandBuffer CommandBuffer=nullptr)
 
void CopyBufferToImage (VkBuffer Buffer, VkImage Image, uint32_t Width, uint32_t Height, VkCommandBuffer CommandBuffer=nullptr)
 
bool CreateBuffer (VkDeviceSize Size, VkBufferUsageFlags Usage, VkMemoryPropertyFlags Properties, VkBuffer &Buffer, VkDeviceMemory &Memory)
 
void CopyBuffer (VkBuffer Src, VkBuffer Dst, VkDeviceSize Size, VkCommandBuffer CommandBuffer=nullptr)
 
VkPipeline CreatePipeline (MythShaderVulkan *Shader, QRect Viewport, std::vector< VkDynamicState > Dynamic={ })
 
VkCommandBuffer CreateSingleUseCommandBuffer (void)
 
void FinishSingleUseCommandBuffer (VkCommandBuffer &Buffer)
 
VkSampler CreateSampler (VkFilter Min, VkFilter Mag)
 
VkPhysicalDeviceFeatures GetPhysicalDeviceFeatures () const
 
VkPhysicalDeviceLimits GetPhysicalDeviceLimits () const
 
- Public Member Functions inherited from MythRender
 MythRender (RenderType type)
 
bool IsShared (void) const
 Warning: The reference count can be decremented between the call to this function and the use of it's value. More...
 
RenderType Type (void) const
 
bool IsErrored (void) const
 
QSize GetSize (void) const
 
virtual void SetViewPort (const QRect, bool=false)
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter (const QString &debugName, bool logDebug=true)
 Creates reference counter with an initial value of 1. More...
 
virtual int IncrRef (void)
 Increments reference count. More...
 
virtual int DecrRef (void)
 Decrements reference count and deletes on 0. More...
 

Static Public Member Functions

static MythRenderVulkanGetVulkanRender (void)
 
- Static Public Member Functions inherited from ReferenceCounter
static void PrintDebug (void)
 Print out any leaks if that level of debugging is enabled. More...
 

Private Member Functions

std::optional< uint32_t > FindMemoryType (uint32_t Filter, VkMemoryPropertyFlags Properties)
 
void BeginFrame (void)
 
void DebugVulkan (void)
 

Private Attributes

MythWindowVulkanm_window { nullptr }
 
VkDevice m_device { nullptr }
 
QVulkanFunctions * m_funcs { nullptr }
 
QVulkanDeviceFunctions * m_devFuncs { nullptr }
 
VkPhysicalDeviceFeatures m_phyDevFeatures { }
 
VkPhysicalDeviceLimits m_phyDevLimits { }
 
bool m_frameExpected { false }
 
bool m_frameStarted { false }
 
QMap< QString, QString > m_debugInfo
 
MythDebugVulkanm_debugMarker { nullptr }
 

Additional Inherited Members

- Protected Member Functions inherited from MythRender
 ~MythRender () override=default
 
virtual void ReleaseResources (void)
 
- Protected Member Functions inherited from ReferenceCounter
virtual ~ReferenceCounter (void)
 Called on destruction, will warn if object deleted with references in place. More...
 
- Protected Attributes inherited from MythRender
RenderType m_type
 
QSize m_size
 
bool m_errored
 
- Protected Attributes inherited from ReferenceCounter
bool m_logDebug
 This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More...
 
QAtomicInt m_referenceCount {1}
 

Detailed Description

Definition at line 57 of file mythrendervulkan.h.

Constructor & Destructor Documentation

◆ MythRenderVulkan()

MythRenderVulkan::MythRenderVulkan ( )

Definition at line 102 of file mythrendervulkan.cpp.

◆ ~MythRenderVulkan()

MythRenderVulkan::~MythRenderVulkan ( )
override

Definition at line 113 of file mythrendervulkan.cpp.

Member Function Documentation

◆ GetVulkanRender()

MythRenderVulkan * MythRenderVulkan::GetVulkanRender ( void  )
static

◆ SetVulkanWindow()

void MythRenderVulkan::SetVulkanWindow ( MythWindowVulkan VulkanWindow)

Definition at line 121 of file mythrendervulkan.cpp.

◆ GetVulkanWindow()

MythWindowVulkan * MythRenderVulkan::GetVulkanWindow ( void  )

◆ SetFrameExpected()

void MythRenderVulkan::SetFrameExpected ( void  )

Definition at line 298 of file mythrendervulkan.cpp.

Referenced by MythPainterVulkan::End(), and MythVideoVulkan::StartFrame().

◆ GetFrameExpected()

bool MythRenderVulkan::GetFrameExpected ( void  ) const

Definition at line 305 of file mythrendervulkan.cpp.

Referenced by MythWindowVulkan::event().

◆ GetFrameStarted()

bool MythRenderVulkan::GetFrameStarted ( void  ) const

Definition at line 310 of file mythrendervulkan.cpp.

◆ EndFrame()

void MythRenderVulkan::EndFrame ( void  )

Definition at line 355 of file mythrendervulkan.cpp.

Referenced by MythPainterVulkan::End(), and MythVideoVulkan::EndFrame().

◆ GetDescription()

QStringList MythRenderVulkan::GetDescription ( void  )
overridevirtual

Reimplemented from MythRender.

Definition at line 162 of file mythrendervulkan.cpp.

◆ preInitResources()

void MythRenderVulkan::preInitResources ( void  )
override

Definition at line 131 of file mythrendervulkan.cpp.

◆ initResources()

void MythRenderVulkan::initResources ( void  )
override

Definition at line 136 of file mythrendervulkan.cpp.

◆ initSwapChainResources()

void MythRenderVulkan::initSwapChainResources ( void  )
override

Definition at line 260 of file mythrendervulkan.cpp.

◆ releaseSwapChainResources()

void MythRenderVulkan::releaseSwapChainResources ( void  )
override

Definition at line 265 of file mythrendervulkan.cpp.

◆ releaseResources()

void MythRenderVulkan::releaseResources ( void  )
override

Definition at line 270 of file mythrendervulkan.cpp.

◆ startNextFrame()

void MythRenderVulkan::startNextFrame ( void  )
override

Definition at line 315 of file mythrendervulkan.cpp.

◆ physicalDeviceLost()

void MythRenderVulkan::physicalDeviceLost ( void  )
override

Definition at line 286 of file mythrendervulkan.cpp.

◆ logicalDeviceLost()

void MythRenderVulkan::logicalDeviceLost ( void  )
override

Definition at line 292 of file mythrendervulkan.cpp.

◆ BeginDebugRegion()

void MythRenderVulkan::BeginDebugRegion ( VkCommandBuffer  CommandBuffer,
const char *  Name,
MythVulkan4F  Color 
)

◆ EndDebugRegion()

void MythRenderVulkan::EndDebugRegion ( VkCommandBuffer  CommandBuffer)

◆ CreateImage()

bool MythRenderVulkan::CreateImage ( QSize  Size,
VkFormat  Format,
VkImageTiling  Tiling,
VkImageUsageFlags  Usage,
VkMemoryPropertyFlags  Properties,
VkImage &  Image,
VkDeviceMemory &  ImageMemory 
)

Definition at line 539 of file mythrendervulkan.cpp.

Referenced by MythTextureVulkan::MythTextureVulkan().

◆ TransitionImageLayout()

void MythRenderVulkan::TransitionImageLayout ( VkImage &  Image,
VkImageLayout  OldLayout,
VkImageLayout  NewLayout,
VkCommandBuffer  CommandBuffer = nullptr 
)

Definition at line 365 of file mythrendervulkan.cpp.

Referenced by MythTextureVulkan::MythTextureVulkan().

◆ CopyBufferToImage()

void MythRenderVulkan::CopyBufferToImage ( VkBuffer  Buffer,
VkImage  Image,
uint32_t  Width,
uint32_t  Height,
VkCommandBuffer  CommandBuffer = nullptr 
)

Definition at line 413 of file mythrendervulkan.cpp.

Referenced by MythTextureVulkan::MythTextureVulkan().

◆ CreateBuffer()

bool MythRenderVulkan::CreateBuffer ( VkDeviceSize  Size,
VkBufferUsageFlags  Usage,
VkMemoryPropertyFlags  Properties,
VkBuffer &  Buffer,
VkDeviceMemory &  Memory 
)

◆ CopyBuffer()

void MythRenderVulkan::CopyBuffer ( VkBuffer  Src,
VkBuffer  Dst,
VkDeviceSize  Size,
VkCommandBuffer  CommandBuffer = nullptr 
)

◆ CreatePipeline()

VkPipeline MythRenderVulkan::CreatePipeline ( MythShaderVulkan Shader,
QRect  Viewport,
std::vector< VkDynamicState >  Dynamic = { } 
)

◆ CreateSingleUseCommandBuffer()

VkCommandBuffer MythRenderVulkan::CreateSingleUseCommandBuffer ( void  )

◆ FinishSingleUseCommandBuffer()

void MythRenderVulkan::FinishSingleUseCommandBuffer ( VkCommandBuffer &  Buffer)

◆ CreateSampler()

VkSampler MythRenderVulkan::CreateSampler ( VkFilter  Min,
VkFilter  Mag 
)

Definition at line 493 of file mythrendervulkan.cpp.

Referenced by MythTextureVulkan::MythTextureVulkan().

◆ GetPhysicalDeviceFeatures()

VkPhysicalDeviceFeatures MythRenderVulkan::GetPhysicalDeviceFeatures ( ) const

Definition at line 516 of file mythrendervulkan.cpp.

Referenced by MythVisualMonoScopeVulkan::InitialiseVulkan().

◆ GetPhysicalDeviceLimits()

VkPhysicalDeviceLimits MythRenderVulkan::GetPhysicalDeviceLimits ( ) const

Definition at line 521 of file mythrendervulkan.cpp.

Referenced by MythVisualMonoScopeVulkan::InitialiseVulkan().

◆ DoFreeResources

void MythRenderVulkan::DoFreeResources ( void  )
signal

◆ PhysicalDeviceLost

void MythRenderVulkan::PhysicalDeviceLost ( void  )
signal

Referenced by physicalDeviceLost().

◆ LogicalDeviceLost

void MythRenderVulkan::LogicalDeviceLost ( void  )
signal

Referenced by logicalDeviceLost().

◆ FindMemoryType()

std::optional< uint32_t > MythRenderVulkan::FindMemoryType ( uint32_t  Filter,
VkMemoryPropertyFlags  Properties 
)
private

Definition at line 593 of file mythrendervulkan.cpp.

Referenced by CreateBuffer(), and CreateImage().

◆ BeginFrame()

void MythRenderVulkan::BeginFrame ( void  )
private

Definition at line 329 of file mythrendervulkan.cpp.

Referenced by startNextFrame().

◆ DebugVulkan()

void MythRenderVulkan::DebugVulkan ( void  )
private

Definition at line 175 of file mythrendervulkan.cpp.

Referenced by initResources().

Member Data Documentation

◆ m_window

MythWindowVulkan* MythRenderVulkan::m_window { nullptr }
private

◆ m_device

VkDevice MythRenderVulkan::m_device { nullptr }
private

◆ m_funcs

QVulkanFunctions* MythRenderVulkan::m_funcs { nullptr }
private

Definition at line 124 of file mythrendervulkan.h.

Referenced by FindMemoryType(), initResources(), and releaseResources().

◆ m_devFuncs

QVulkanDeviceFunctions* MythRenderVulkan::m_devFuncs { nullptr }
private

◆ m_phyDevFeatures

VkPhysicalDeviceFeatures MythRenderVulkan::m_phyDevFeatures { }
private

Definition at line 126 of file mythrendervulkan.h.

Referenced by GetPhysicalDeviceFeatures(), initResources(), and releaseResources().

◆ m_phyDevLimits

VkPhysicalDeviceLimits MythRenderVulkan::m_phyDevLimits { }
private

Definition at line 127 of file mythrendervulkan.h.

Referenced by GetPhysicalDeviceLimits(), initResources(), and releaseResources().

◆ m_frameExpected

bool MythRenderVulkan::m_frameExpected { false }
private

◆ m_frameStarted

bool MythRenderVulkan::m_frameStarted { false }
private

Definition at line 129 of file mythrendervulkan.h.

Referenced by BeginFrame(), EndFrame(), GetFrameStarted(), and releaseResources().

◆ m_debugInfo

QMap<QString,QString> MythRenderVulkan::m_debugInfo
private

Definition at line 130 of file mythrendervulkan.h.

Referenced by DebugVulkan(), and GetDescription().

◆ m_debugMarker

MythDebugVulkan* MythRenderVulkan::m_debugMarker { nullptr }
private

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