15 #include <vsg/state/ShaderModule.h>
29 ShaderStage(VkShaderStageFlagBits stage,
const std::string& entryPointName,
const ShaderModule::SPIRV&
spirv);
30 ShaderStage(VkShaderStageFlagBits stage,
const std::string& entryPointName,
const std::string& source,
const ShaderModule::SPIRV&
spirv);
32 using SpecializationConstants = std::map<uint32_t, vsg::ref_ptr<vsg::Data>>;
38 VkPipelineShaderStageCreateFlags flags = 0;
39 VkShaderStageFlagBits stage = {};
41 std::string entryPointName;
42 SpecializationConstants specializationConstants;
45 static ref_ptr<ShaderStage> read(VkShaderStageFlagBits stage,
const std::string& entryPointName, std::istream& fin, ref_ptr<const Options> options = {});
49 void read(
Input& input)
override;
50 void write(
Output& output)
const override;
52 void apply(
Context& context, VkPipelineShaderStageCreateInfo& stageInfo)
const;
62 using ShaderStages = std::vector<ref_ptr<ShaderStage>>;
ShaderStage encapsulates VkPipelineShaderStageCreateInfo settings passed when setting up GraphicsPipe...
Definition: ShaderStage.h:24
int compare(const Object &rhs_object) const override
compare two objects, return -1 if this object is less than rhs, return 0 if it's equal,...
ReaderWriter for reading and writing spirv shader files.
Definition: spirv.h:35