23 class VSG_DECLSPEC ShaderStage :
public Inherit<Object, ShaderStage>
27 ShaderStage(
const ShaderStage& rhs,
const CopyOp& copyop = {});
28 ShaderStage(VkShaderStageFlagBits stage,
const std::string& entryPointName,
ref_ptr<ShaderModule> shaderModule);
30 ShaderStage(VkShaderStageFlagBits stage,
const std::string& entryPointName,
const ShaderModule::SPIRV&
spirv);
31 ShaderStage(VkShaderStageFlagBits stage,
const std::string& entryPointName,
const std::string& source,
const ShaderModule::SPIRV&
spirv);
33 using SpecializationConstants = std::map<uint32_t, vsg::ref_ptr<vsg::Data>>;
39 VkPipelineShaderStageCreateFlags
flags = 0;
40 VkShaderStageFlagBits stage = {};
42 std::string entryPointName;
43 SpecializationConstants specializationConstants;
46 static ref_ptr<ShaderStage> read(VkShaderStageFlagBits stage,
const std::string& entryPointName, std::istream& fin, ref_ptr<const Options> options = {});
48 void apply(Context& context, VkPipelineShaderStageCreateInfo& stageInfo)
const;
51 void compile(Context& context);
57 void read(
Input& input)
override;
58 void write(
Output& output)
const override;
61 virtual ~ShaderStage();
VkPipelineShaderStageCreateFlags flags
Vulkan VkPipelineShaderStageCreateInfo settings.
Definition ShaderStage.h:39
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,...