MythTV
master
|
#include <libmythui/vulkan/mythrendervulkan.h>
Signals | |
void | DoFreeResources (void) |
void | PhysicalDeviceLost (void) |
void | LogicalDeviceLost (void) |
Public Member Functions | |
MythRenderVulkan () | |
~MythRenderVulkan () override | |
void | SetVulkanWindow (MythWindowVulkan *VulkanWindow) |
MythWindowVulkan * | GetVulkanWindow (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 |
![]() | |
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) |
![]() | |
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 MythRenderVulkan * | GetVulkanRender (void) |
![]() | |
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 | |
MythWindowVulkan * | m_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 |
MythDebugVulkan * | m_debugMarker { nullptr } |
Additional Inherited Members | |
![]() | |
~MythRender () override=default | |
virtual void | ReleaseResources (void) |
![]() | |
virtual | ~ReferenceCounter (void) |
Called on destruction, will warn if object deleted with references in place. More... | |
![]() | |
RenderType | m_type |
QSize | m_size |
bool | m_errored |
![]() | |
bool | m_logDebug |
This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
QAtomicInt | m_referenceCount {1} |
Definition at line 57 of file mythrendervulkan.h.
MythRenderVulkan::MythRenderVulkan | ( | ) |
Definition at line 102 of file mythrendervulkan.cpp.
|
override |
Definition at line 113 of file mythrendervulkan.cpp.
|
static |
Definition at line 88 of file mythrendervulkan.cpp.
Referenced by MythVideoOutputVulkan::GetAllowedRenderers(), and MythPainterVulkan::Ready().
void MythRenderVulkan::SetVulkanWindow | ( | MythWindowVulkan * | VulkanWindow | ) |
Definition at line 121 of file mythrendervulkan.cpp.
MythWindowVulkan * MythRenderVulkan::GetVulkanWindow | ( | void | ) |
Definition at line 126 of file mythrendervulkan.cpp.
Referenced by MythVulkanObject::MythVulkanObject(), and MythPainterVulkan::Ready().
void MythRenderVulkan::SetFrameExpected | ( | void | ) |
Definition at line 298 of file mythrendervulkan.cpp.
Referenced by MythPainterVulkan::End(), and MythVideoVulkan::StartFrame().
bool MythRenderVulkan::GetFrameExpected | ( | void | ) | const |
Definition at line 305 of file mythrendervulkan.cpp.
Referenced by MythWindowVulkan::event().
bool MythRenderVulkan::GetFrameStarted | ( | void | ) | const |
Definition at line 310 of file mythrendervulkan.cpp.
void MythRenderVulkan::EndFrame | ( | void | ) |
Definition at line 355 of file mythrendervulkan.cpp.
Referenced by MythPainterVulkan::End(), and MythVideoVulkan::EndFrame().
|
overridevirtual |
Reimplemented from MythRender.
Definition at line 162 of file mythrendervulkan.cpp.
|
override |
Definition at line 131 of file mythrendervulkan.cpp.
|
override |
Definition at line 136 of file mythrendervulkan.cpp.
|
override |
Definition at line 260 of file mythrendervulkan.cpp.
|
override |
Definition at line 265 of file mythrendervulkan.cpp.
|
override |
Definition at line 270 of file mythrendervulkan.cpp.
|
override |
Definition at line 315 of file mythrendervulkan.cpp.
|
override |
Definition at line 286 of file mythrendervulkan.cpp.
|
override |
Definition at line 292 of file mythrendervulkan.cpp.
void MythRenderVulkan::BeginDebugRegion | ( | VkCommandBuffer | CommandBuffer, |
const char * | Name, | ||
MythVulkan4F | Color | ||
) |
Definition at line 526 of file mythrendervulkan.cpp.
Referenced by MythPainterVulkan::End(), MythVideoVulkan::PrepareFrame(), and MythVideoOutputVulkan::RenderFrame().
void MythRenderVulkan::EndDebugRegion | ( | VkCommandBuffer | CommandBuffer | ) |
Definition at line 533 of file mythrendervulkan.cpp.
Referenced by MythPainterVulkan::End(), MythVideoVulkan::PrepareFrame(), and MythVideoOutputVulkan::RenderEnd().
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().
void MythRenderVulkan::TransitionImageLayout | ( | VkImage & | Image, |
VkImageLayout | OldLayout, | ||
VkImageLayout | NewLayout, | ||
VkCommandBuffer | CommandBuffer = nullptr |
||
) |
Definition at line 365 of file mythrendervulkan.cpp.
Referenced by MythTextureVulkan::MythTextureVulkan().
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().
bool MythRenderVulkan::CreateBuffer | ( | VkDeviceSize | Size, |
VkBufferUsageFlags | Usage, | ||
VkMemoryPropertyFlags | Properties, | ||
VkBuffer & | Buffer, | ||
VkDeviceMemory & | Memory | ||
) |
Definition at line 450 of file mythrendervulkan.cpp.
Referenced by MythBufferVulkan::MythBufferVulkan(), MythIndexBufferVulkan::MythIndexBufferVulkan(), MythTextureVulkan::MythTextureVulkan(), and MythUniformBufferVulkan::MythUniformBufferVulkan().
void MythRenderVulkan::CopyBuffer | ( | VkBuffer | Src, |
VkBuffer | Dst, | ||
VkDeviceSize | Size, | ||
VkCommandBuffer | CommandBuffer = nullptr |
||
) |
Definition at line 433 of file mythrendervulkan.cpp.
Referenced by MythIndexBufferVulkan::MythIndexBufferVulkan(), MythBufferVulkan::Update(), and MythVertexBufferVulkan::Update().
VkPipeline MythRenderVulkan::CreatePipeline | ( | MythShaderVulkan * | Shader, |
QRect | Viewport, | ||
std::vector< VkDynamicState > | Dynamic = { } |
||
) |
Definition at line 639 of file mythrendervulkan.cpp.
Referenced by MythVisualVulkan::InitialiseVulkan(), and MythPainterVulkan::Ready().
VkCommandBuffer MythRenderVulkan::CreateSingleUseCommandBuffer | ( | void | ) |
Definition at line 611 of file mythrendervulkan.cpp.
Referenced by CopyBuffer(), CopyBufferToImage(), MythVideoTextureVulkan::DeleteTextures(), MythPainterVulkan::GetTextureFromCache(), MythTextureVulkan::MythTextureVulkan(), MythVideoVulkan::PrepareFrame(), and TransitionImageLayout().
void MythRenderVulkan::FinishSingleUseCommandBuffer | ( | VkCommandBuffer & | Buffer | ) |
Definition at line 627 of file mythrendervulkan.cpp.
Referenced by CopyBuffer(), CopyBufferToImage(), MythVideoTextureVulkan::DeleteTextures(), MythPainterVulkan::End(), MythTextureVulkan::MythTextureVulkan(), MythVideoVulkan::PrepareFrame(), and TransitionImageLayout().
VkSampler MythRenderVulkan::CreateSampler | ( | VkFilter | Min, |
VkFilter | Mag | ||
) |
Definition at line 493 of file mythrendervulkan.cpp.
Referenced by MythTextureVulkan::MythTextureVulkan().
VkPhysicalDeviceFeatures MythRenderVulkan::GetPhysicalDeviceFeatures | ( | ) | const |
Definition at line 516 of file mythrendervulkan.cpp.
Referenced by MythVisualMonoScopeVulkan::InitialiseVulkan().
VkPhysicalDeviceLimits MythRenderVulkan::GetPhysicalDeviceLimits | ( | ) | const |
Definition at line 521 of file mythrendervulkan.cpp.
Referenced by MythVisualMonoScopeVulkan::InitialiseVulkan().
|
signal |
Referenced by MythPainterVulkan::MythPainterVulkan(), and releaseResources().
|
signal |
Referenced by physicalDeviceLost().
|
signal |
Referenced by logicalDeviceLost().
|
private |
Definition at line 593 of file mythrendervulkan.cpp.
Referenced by CreateBuffer(), and CreateImage().
|
private |
Definition at line 329 of file mythrendervulkan.cpp.
Referenced by startNextFrame().
|
private |
Definition at line 175 of file mythrendervulkan.cpp.
Referenced by initResources().
|
private |
Definition at line 122 of file mythrendervulkan.h.
Referenced by BeginFrame(), CreatePipeline(), CreateSingleUseCommandBuffer(), DebugVulkan(), EndFrame(), FindMemoryType(), FinishSingleUseCommandBuffer(), GetVulkanWindow(), initResources(), SetVulkanWindow(), and startNextFrame().
|
private |
Definition at line 123 of file mythrendervulkan.h.
Referenced by CreateBuffer(), CreateImage(), CreatePipeline(), CreateSampler(), CreateSingleUseCommandBuffer(), FinishSingleUseCommandBuffer(), initResources(), and releaseResources().
|
private |
Definition at line 124 of file mythrendervulkan.h.
Referenced by FindMemoryType(), initResources(), and releaseResources().
|
private |
Definition at line 125 of file mythrendervulkan.h.
Referenced by BeginFrame(), CopyBuffer(), CopyBufferToImage(), CreateBuffer(), CreateImage(), CreatePipeline(), CreateSampler(), CreateSingleUseCommandBuffer(), EndFrame(), FinishSingleUseCommandBuffer(), initResources(), releaseResources(), and TransitionImageLayout().
|
private |
Definition at line 126 of file mythrendervulkan.h.
Referenced by GetPhysicalDeviceFeatures(), initResources(), and releaseResources().
|
private |
Definition at line 127 of file mythrendervulkan.h.
Referenced by GetPhysicalDeviceLimits(), initResources(), and releaseResources().
Definition at line 128 of file mythrendervulkan.h.
Referenced by GetFrameExpected(), releaseResources(), SetFrameExpected(), and startNextFrame().
Definition at line 129 of file mythrendervulkan.h.
Referenced by BeginFrame(), EndFrame(), GetFrameStarted(), and releaseResources().
|
private |
Definition at line 130 of file mythrendervulkan.h.
Referenced by DebugVulkan(), and GetDescription().
|
private |
Definition at line 131 of file mythrendervulkan.h.
Referenced by BeginDebugRegion(), EndDebugRegion(), initResources(), and releaseResources().