31 vkShader(
const VkDevice & d,
const char * vs,
const char * fs)
32 :
Shader(vs, fs), device(d)
37 createShaderModules(device);
43 std::vector<VkPipelineShaderStageCreateInfo>
shaderStage()
const;
49 const VkDevice & device;
51 VkShaderModule vertexModule, fragmentModule;
53 std::vector<uint32_t> vertexSource, fragmentSource;
57 std::vector<char> readSPIRV(
const std::string & filename);
58 void createShaderModules(
const VkDevice & device);
61 std::string preprocessShader
63 const std::string& source_name,
64 shaderc_shader_kind kind,
65 const std::string& source,
66 shaderc::CompileOptions options
71 std::string compileToAssembly
73 const std::string& source_name,
74 shaderc_shader_kind kind,
75 const std::string& source,
76 shaderc::CompileOptions options,
83 std::vector<uint32_t> compileSPIRV
85 const std::string& source_name,
86 shaderc_shader_kind kind,
87 const std::string& source,
88 shaderc::CompileOptions options,