5 #include "spirv_cross.hpp" 6 #include "spirv_glsl.hpp" 17 typedef VkDescriptorUpdateTemplateKHR VkDescriptorUpdateTemplate;
18 typedef VkDescriptorUpdateTemplateEntryKHR VkDescriptorUpdateTemplateEntry;
36 image.sampler = VK_NULL_HANDLE;
37 image.imageView = imageView;
38 image.imageLayout = imageLayout;
41 DescriptorInfo(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout)
43 image.sampler = sampler;
44 image.imageView = imageView;
45 image.imageLayout = imageLayout;
59 buffer.range = VK_WHOLE_SIZE;
94 VkShaderStageFlagBits
GetStage()
const {
return m_Stage; }
101 static VkDescriptorSetLayout CreateSetLayout(VkDevice t_Dev, std::vector<Shader*>& t_Shaders,
bool t_SupportPushDescriptor =
false);
103 static VkPipelineLayout CreatePipelineLayout(VkDevice t_Dev, VkDescriptorSetLayout t_SetLayout, VkShaderStageFlags t_PushConstantStages,
size_t t_PushConstantSize);
107 static UINT32 GatherResources(
const std::vector<Shader*>& t_Shaders, VkDescriptorType(&t_ResourceTypes)[32]);
112 void ParseReflectionData(
const UINT32* t_Code,
UINT32 t_Size);
120 static std::vector<char> LoadRawBytes(
const std::string& t_FilePath);
123 VkShaderModule m_Module = VK_NULL_HANDLE;
129 VkDescriptorType m_ResourceTypes[32] {};
132 VkShaderStageFlagBits m_Stage = VkShaderStageFlagBits::VK_SHADER_STAGE_VERTEX_BIT;
136 bool m_UsesPushConstants =
false;
DescriptorInfo()
Definition: Shader.h:30
DescriptorInfo(VkBuffer buffer_)
Definition: Shader.h:55
DescriptorInfo(VkBuffer buffer_, VkDeviceSize offset, VkDeviceSize range)
Definition: Shader.h:48
VkShaderModule CreateShaderModule(std::shared_ptr< File > t_ShaderCode)
Definition: GraphicsHelpers.cpp:592
VkDescriptorBufferInfo buffer
Definition: Shader.h:27
DescriptorInfo(VkImageView imageView, VkImageLayout imageLayout)
Definition: Shader.h:34
Base class that represents a loaded resource in the engine.
Definition: Resource.h:11
A logical device represents the application view of the device.
Definition: LogicalDevice.h:13
VkShaderModule GetShaderModule() const
Create a Shader Module object.
Definition: Shader.h:91
VkDescriptorImageInfo image
Definition: Shader.h:26
DescriptorInfo(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout)
Definition: Shader.h:41
Class that represents what a shader is in the Fling engine.
Definition: Shader.h:70
const LogicalDevice * m_Device
Definition: Shader.h:134
entt::hashed_string Guid
Definition: FlingTypes.h:26
VkShaderStageFlagBits GetStage() const
get the Vulkan stage bit flags that we should bind to
Definition: Shader.h:94
The resource manager handles loading of files off disk.
Definition: ResourceManager.h:23
uint32_t UINT32
Definition: FlingTypes.h:13