Function gpa::shader_utilities::CompileToSPIRV

Function Documentation

void gpa::shader_utilities::CompileToSPIRV(api_types::ShaderStageFlagBits stage, api_types::ShaderLanguage language, std::string const &shaderCode, std::vector<uint32_t> *spirv, std::string *infoLog, std::string *debugLog)

Compiles GLSL source code into SPIR-V bytecode.

Parameters
  • stage -- The VkShaderStageFlagBits for the shader to compile

  • glsl -- The GLSL source code to compile

  • spirv -- (out) The compiled SPIR-V bytecode

  • infoLog -- (out) The info log from the compiler

  • debugLog -- (out) The debug log from the compiler