Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
ShaderCompiler.hpp
1#pragma once
2
3#include "graphics/Program.hpp"
4#include "graphics/GPUObjects.hpp"
5#include "Common.hpp"
6
12
13public:
14
22 static void compile(const std::string & prog, ShaderType type, Program::Stage & stage, bool generateModule, std::string & finalLog);
23
27 static bool init();
28
30 static void cleanup();
31
35 static void clean(Program::Stage & stage);
36
37private:
38
43 static void reflect(const std::vector<uint32_t>& spirv, Program::Stage & stage);
44
45};
Relies on glslang to compile GLSL shaders to SPIR-V and SPIRV-Cross to generate reflection data.
Definition: ShaderCompiler.hpp:11
static void compile(const std::string &prog, ShaderType type, Program::Stage &stage, bool generateModule, std::string &finalLog)
Definition: ShaderCompiler.cpp:147
static void cleanup()
Definition: ShaderCompiler.cpp:135
static void clean(Program::Stage &stage)
Definition: ShaderCompiler.cpp:139
static void reflect(const std::vector< uint32_t > &spirv, Program::Stage &stage)
Definition: ShaderCompiler.cpp:377
static bool init()
Definition: ShaderCompiler.cpp:131
ShaderType
The type of a shader.
Definition: GPUTypes.hpp:18
Per-stage reflection information.
Definition: Program.hpp:395