11#include <glslang/Public/ShaderLang.h>
37 [[nodiscard]] std::string
getName()
const override {
return "GLSL"; }
61 return EShLangFragment;
63 return EShLangGeometry;
65 return EShLangCompute;
67 throw std::runtime_error(
"Unsupported ShaderStage");
This file contains the ShaderFrontend abstract class.
Abstract class for shader frontend.
Class for the GLSL plugin.
GLSL & operator=(GLSL &&)=delete
utl::PluginType getType() const override
Get the type of the plugin.
GLSL(const GLSL &)=delete
std::string getName() const override
Get the name of the plugin.
utl::PluginPlatform getPlatform() const override
Get the handled platform of the plugin.
ShaderIRModule compile(const ShaderSourceDesc &desc) override
Compile shader source to intermediate representation.
ShaderSourceType sourceType() const override
Get the source type this frontend handles.
GLSL & operator=(const GLSL &)=delete
static std::vector< uint32_t > compileGLSLtoSPIRV(const std::string &src, ShaderStage stage)
static EShLanguage shaderStageToESh(const ShaderStage stage)
Struct for shader intermediate representation module.
std::vector< uint32_t > spirv
Struct for shader source description.