1 #ifndef MYTHSHADERVULKAN_H
2 #define MYTHSHADERVULKAN_H
7 using MythShaderMap = std::map<int, std::pair<QString, std::vector<uint32_t>>>;
9 using MythSPIRVStage = std::pair<VkShaderStageFlags, const std::vector<uint32_t>>;
15 VkVertexInputBindingDescription,
24 const std::vector<int> &Stages,
29 VkPrimitiveTopology GetTopology ()
const;
30 VkPipelineLayout GetPipelineLayout (
void)
const;
32 const VkVertexInputBindingDescription& GetVertexBindingDesc(
void)
const;
33 const std::vector<VkPipelineShaderStageCreateInfo>& Stages(
void)
const;
34 const std::vector<VkDescriptorPoolSize>& GetPoolSizes(
size_t Set)
const;
35 VkDescriptorSetLayout GetDescSetLayout(
size_t Set)
const;
38 static bool InitGLSLang(
bool Release =
false);
43 const std::vector<int> &Stages,
50 bool CreateShaderFromGLSL (
const std::vector<MythGLSLStage> &Stages);
52 bool CreateShaderFromSPIRV (
const std::vector<MythSPIRVStage> &Stages);
54 VkPrimitiveTopology m_topology { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP };
55 VkVertexInputBindingDescription m_vertexBindingDesc { };
57 std::vector<VkPipelineShaderStageCreateInfo>
m_stages;