17 #include <vsg/vk/Device.h>
18 #include <vsg/vk/vk_buffer.h>
38 SPIRV_1_0 = (1 << 16),
39 SPIRV_1_1 = (1 << 16) | (1 << 8),
40 SPIRV_1_2 = (1 << 16) | (2 << 8),
41 SPIRV_1_3 = (1 << 16) | (3 << 8),
42 SPIRV_1_4 = (1 << 16) | (4 << 8),
43 SPIRV_1_5 = (1 << 16) | (5 << 8)
46 uint32_t vulkanVersion = VK_API_VERSION_1_0;
47 int clientInputVersion = 100;
48 Language language = GLSL;
49 int defaultVersion = 450;
50 SpirvTarget target = SPIRV_1_0;
51 bool forwardCompatible =
false;
52 bool generateDebugInfo =
false;
54 std::set<std::string> defines;
58 void read(
Input& input)
override;
59 void write(
Output& output)
const override;
68 using SPIRV = std::vector<uint32_t>;
73 ShaderModule(
const std::string& source,
const SPIRV& in_code);
82 VkShaderModule
vk(uint32_t deviceID)
const {
return _implementation[deviceID]->_shaderModule; }
86 void read(
Input& input)
override;
87 void write(
Output& output)
const override;
93 void release(uint32_t deviceID) { _implementation[deviceID] = {}; }
94 void release() { _implementation.clear(); }
97 virtual ~ShaderModule();
105 VkShaderModule _shaderModule;
114 extern VSG_DECLSPEC std::string insertIncludes(
const std::string& source,
ref_ptr<const Options> options);
Device encapsulates VkDevice, a logical handle to the PhysicalDevice with capabilities specified duri...
Definition: Device.h:37
Definition: ShaderModule.h:28
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,...
Definition: ShaderModule.h:66
VkShaderModule vk(uint32_t deviceID) const
Vulkan VkShaderModule handle.
Definition: ShaderModule.h:82
SPIRV code
VkShaderModuleCreateInfo settings.
Definition: ShaderModule.h:79
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,...
Definition: ShaderModule.h:100
vk_buffer that manages a single logical device supported.
Definition: vk_buffer.h:28