MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MythShaderVulkan Class Reference

Creates shader objects suitable for use with the Vulkan API. More...

#include <libmythui/vulkan/mythshadervulkan.h>

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

Public Member Functions

 ~MythShaderVulkan ()
 
VkPrimitiveTopology GetTopology () const
 
VkPipelineLayout GetPipelineLayout (void) const
 
const MythVertexAttrsGetVertexAttributes (void) const
 
const VkVertexInputBindingDescription & GetVertexBindingDesc (void) const
 
const std::vector< VkPipelineShaderStageCreateInfo > & Stages (void) const
 
const std::vector< VkDescriptorPoolSize > & GetPoolSizes (size_t Set) const
 
VkDescriptorSetLayout GetDescSetLayout (size_t Set) const
 

Static Public Member Functions

static MythShaderVulkanCreate (MythVulkanObject *Vulkan, const std::vector< int > &Stages, const MythShaderMap *Sources=nullptr, const MythBindingMap *Bindings=nullptr)
 

Protected Member Functions

 MythShaderVulkan (MythVulkanObject *Vulkan, const std::vector< int > &Stages, const MythShaderMap *Sources=nullptr, const MythBindingMap *Bindings=nullptr)
 
- Protected Member Functions inherited from MythVulkanObject
void CheckValid ()
 
 MythVulkanObject (MythRenderVulkan *Render)
 
 MythVulkanObject (MythVulkanObject *Other)
 
bool IsValidVulkan () const
 
MythRenderVulkanRender ()
 
VkDevice Device ()
 
QVulkanDeviceFunctions * Funcs ()
 
MythWindowVulkanWindow ()
 

Private Member Functions

bool CreateShaderFromSPIRV (const std::vector< MythSPIRVStage > &Stages)
 

Private Attributes

VkPrimitiveTopology m_topology { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP }
 
VkVertexInputBindingDescription m_vertexBindingDesc { }
 
MythVertexAttrs m_vertexAttributes
 
std::vector< VkPipelineShaderStageCreateInfo > m_stages
 
std::vector< uint32_t * > m_spirv
 
VkPipelineLayout m_pipelineLayout { MYTH_NULL_DISPATCH }
 
std::vector< VkDescriptorSetLayout > m_descriptorSetLayouts
 
std::vector< std::vector< VkDescriptorPoolSize > > m_descriptorPoolSizes
 

Additional Inherited Members

- Static Protected Member Functions inherited from MythVulkanObject
static MythVulkanObjectCreate (MythRenderVulkan *Render)
 
- Protected Attributes inherited from MythVulkanObject
bool m_vulkanValid { true }
 
MythRenderVulkanm_vulkanRender { nullptr }
 
VkDevice m_vulkanDevice { nullptr }
 
QVulkanDeviceFunctions * m_vulkanFuncs { nullptr }
 
MythWindowVulkanm_vulkanWindow { nullptr }
 

Detailed Description

Creates shader objects suitable for use with the Vulkan API.

By default, shaders are created from SPIR-V bytecode. If libglslang support is available and the environment variable MYTHTV_GLSLANG is set, shaders will be compiled from the GLSL source code. libglslang support is currently intended for development use only - i.e. to test and compile shaders.

Definition at line 20 of file mythshadervulkan.h.

Constructor & Destructor Documentation

◆ ~MythShaderVulkan()

MythShaderVulkan::~MythShaderVulkan ( )

Definition at line 404 of file mythshadervulkan.cpp.

◆ MythShaderVulkan()

MythShaderVulkan::MythShaderVulkan ( MythVulkanObject Vulkan,
const std::vector< int > &  Stages,
const MythShaderMap Sources = nullptr,
const MythBindingMap Bindings = nullptr 
)
protected

Definition at line 275 of file mythshadervulkan.cpp.

Referenced by Create().

Member Function Documentation

◆ Create()

MythShaderVulkan * MythShaderVulkan::Create ( MythVulkanObject Vulkan,
const std::vector< int > &  Stages,
const MythShaderMap Sources = nullptr,
const MythBindingMap Bindings = nullptr 
)
static

◆ GetTopology()

VkPrimitiveTopology MythShaderVulkan::GetTopology ( ) const

Definition at line 478 of file mythshadervulkan.cpp.

Referenced by MythRenderVulkan::CreatePipeline().

◆ GetPipelineLayout()

VkPipelineLayout MythShaderVulkan::GetPipelineLayout ( void  ) const

◆ GetVertexAttributes()

const MythVertexAttrs & MythShaderVulkan::GetVertexAttributes ( void  ) const

Definition at line 448 of file mythshadervulkan.cpp.

Referenced by MythRenderVulkan::CreatePipeline().

◆ GetVertexBindingDesc()

const VkVertexInputBindingDescription & MythShaderVulkan::GetVertexBindingDesc ( void  ) const

Definition at line 453 of file mythshadervulkan.cpp.

Referenced by MythRenderVulkan::CreatePipeline().

◆ Stages()

const std::vector< VkPipelineShaderStageCreateInfo > & MythShaderVulkan::Stages ( void  ) const

◆ GetPoolSizes()

const std::vector< VkDescriptorPoolSize > & MythShaderVulkan::GetPoolSizes ( size_t  Set) const

◆ GetDescSetLayout()

VkDescriptorSetLayout MythShaderVulkan::GetDescSetLayout ( size_t  Set) const

◆ CreateShaderFromSPIRV()

bool MythShaderVulkan::CreateShaderFromSPIRV ( const std::vector< MythSPIRVStage > &  Stages)
private

Definition at line 418 of file mythshadervulkan.cpp.

Member Data Documentation

◆ m_topology

VkPrimitiveTopology MythShaderVulkan::m_topology { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP }
private

Definition at line 54 of file mythshadervulkan.h.

Referenced by GetTopology(), and MythShaderVulkan().

◆ m_vertexBindingDesc

VkVertexInputBindingDescription MythShaderVulkan::m_vertexBindingDesc { }
private

Definition at line 55 of file mythshadervulkan.h.

Referenced by GetVertexBindingDesc(), and MythShaderVulkan().

◆ m_vertexAttributes

MythVertexAttrs MythShaderVulkan::m_vertexAttributes
private

Definition at line 56 of file mythshadervulkan.h.

Referenced by GetVertexAttributes(), and MythShaderVulkan().

◆ m_stages

std::vector<VkPipelineShaderStageCreateInfo> MythShaderVulkan::m_stages
private

Definition at line 57 of file mythshadervulkan.h.

Referenced by CreateShaderFromSPIRV(), Stages(), and ~MythShaderVulkan().

◆ m_spirv

std::vector<uint32_t*> MythShaderVulkan::m_spirv
private

Definition at line 58 of file mythshadervulkan.h.

Referenced by CreateShaderFromSPIRV(), and ~MythShaderVulkan().

◆ m_pipelineLayout

VkPipelineLayout MythShaderVulkan::m_pipelineLayout { MYTH_NULL_DISPATCH }
private

Definition at line 59 of file mythshadervulkan.h.

Referenced by GetPipelineLayout(), MythShaderVulkan(), and ~MythShaderVulkan().

◆ m_descriptorSetLayouts

std::vector<VkDescriptorSetLayout> MythShaderVulkan::m_descriptorSetLayouts
private

Definition at line 62 of file mythshadervulkan.h.

Referenced by GetDescSetLayout(), MythShaderVulkan(), and ~MythShaderVulkan().

◆ m_descriptorPoolSizes

std::vector<std::vector<VkDescriptorPoolSize> > MythShaderVulkan::m_descriptorPoolSizes
private

Definition at line 63 of file mythshadervulkan.h.

Referenced by GetPoolSizes(), and MythShaderVulkan().


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