1#ifndef MYTHSHADERVULKAN_H
2#define MYTHSHADERVULKAN_H
5#include "libmythbase/mythconfig.h"
8using MythShaderMap = std::map<int, std::pair<QString, std::vector<uint32_t>>>;
10using MythSPIRVStage = std::pair<VkShaderStageFlags, const std::vector<uint32_t>>;
16 VkVertexInputBindingDescription,
25 const std::vector<int> &Stages,
30 VkPrimitiveTopology GetTopology ()
const;
31 VkPipelineLayout GetPipelineLayout (
void)
const;
33 const VkVertexInputBindingDescription& GetVertexBindingDesc(
void)
const;
34 const std::vector<VkPipelineShaderStageCreateInfo>& Stages(
void)
const;
35 const std::vector<VkDescriptorPoolSize>& GetPoolSizes(
size_t Set)
const;
36 VkDescriptorSetLayout GetDescSetLayout(
size_t Set)
const;
39 static bool InitGLSLang(
bool Release =
false);
44 const std::vector<int> &Stages,
51 bool CreateShaderFromGLSL (
const std::vector<MythGLSLStage> &Stages);
53 bool CreateShaderFromSPIRV (
const std::vector<MythSPIRVStage> &Stages);
55 VkPrimitiveTopology m_topology { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP };
56 VkVertexInputBindingDescription m_vertexBindingDesc { };
58 std::vector<VkPipelineShaderStageCreateInfo>
m_stages;
Creates shader objects suitable for use with the Vulkan API.
std::vector< uint32_t * > m_spirv
std::vector< std::vector< VkDescriptorPoolSize > > m_descriptorPoolSizes
MythVertexAttrs m_vertexAttributes
std::vector< VkPipelineShaderStageCreateInfo > m_stages
std::vector< VkDescriptorSetLayout > m_descriptorSetLayouts
static MythVulkanObject * Create(MythRenderVulkan *Render)
#define MYTH_NULL_DISPATCH
std::pair< VkShaderStageFlags, const std::vector< uint32_t > > MythSPIRVStage
std::map< int, std::pair< QString, std::vector< uint32_t > > > MythShaderMap
std::vector< VkVertexInputAttributeDescription > MythVertexAttrs
std::tuple< VkPrimitiveTopology, MythStageLayout, VkVertexInputBindingDescription, MythVertexAttrs, VkPushConstantRange > MythBindingDesc
std::pair< VkShaderStageFlags, QString > MythGLSLStage
std::vector< MythSetLayout > MythStageLayout
std::map< int, MythBindingDesc > MythBindingMap
std::pair< int, VkDescriptorSetLayoutBinding > MythSetLayout