|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Compiles and links GLSL shaders into SPIR-V bytecode. More...
#include <C:/Code/AeonEngine/engine/renderers/vulkan/SPIR-V/CompilerLinker.hpp>

Public Types | |
| enum | TOptions { EOptionNone = 0 , EOptionIntermediate = ( 1 << 0 ) , EOptionSuppressInfolog = ( 1 << 1 ) , EOptionMemoryLeakMode = ( 1 << 2 ) , EOptionRelaxedErrors = ( 1 << 3 ) , EOptionGiveWarnings = ( 1 << 4 ) , EOptionLinkProgram = ( 1 << 5 ) , EOptionMultiThreaded = ( 1 << 6 ) , EOptionDumpConfig = ( 1 << 7 ) , EOptionDumpReflection = ( 1 << 8 ) , EOptionSuppressWarnings = ( 1 << 9 ) , EOptionDumpVersions = ( 1 << 10 ) , EOptionSpv = ( 1 << 11 ) , EOptionHumanReadableSpv = ( 1 << 12 ) , EOptionVulkanRules = ( 1 << 13 ) , EOptionDefaultDesktop = ( 1 << 14 ) , EOptionOutputPreprocessed = ( 1 << 15 ) , EOptionOutputHexadecimal = ( 1 << 16 ) , EOptionReadHlsl = ( 1 << 17 ) , EOptionCascadingErrors = ( 1 << 18 ) , EOptionAutoMapBindings = ( 1 << 19 ) , EOptionFlattenUniformArrays = ( 1 << 20 ) , EOptionNoStorageFormat = ( 1 << 21 ) , EOptionKeepUncalled = ( 1 << 22 ) } |
| Compiler/linker option flags. More... | |
| enum | FailCode { ESuccess = 0 , EFailCompile , EFailLink } |
| Process exit/result codes. More... | |
Public Member Functions | |
| CompilerLinker (TOptions aOptions=static_cast< TOptions >(EOptionSpv|EOptionVulkanRules|EOptionLinkProgram)) | |
| Constructor. | |
| void | AddShaderSource (EShLanguage aStage, const char *aSource) |
| Add GLSL source code for a shader stage. | |
| void | RemoveShaderSource (EShLanguage aStage) |
| Remove the shader source for a given stage. | |
| FailCode | CompileAndLink () |
| Compile all added shader sources and link into a program. | |
| const std::vector< uint32_t > & | GetSpirV (EShLanguage aStage) const |
| Get the compiled SPIR-V bytecode for a shader stage. | |
| const std::string & | GetLog () const |
| Get the compilation/link log output. | |
Compiles and links GLSL shaders into SPIR-V bytecode.
Definition at line 26 of file CompilerLinker.hpp.
Process exit/result codes.
Definition at line 62 of file CompilerLinker.hpp.
Compiler/linker option flags.
Definition at line 31 of file CompilerLinker.hpp.
| AeonGames::CompilerLinker::CompilerLinker | ( | TOptions | aOptions = static_cast<TOptions> ( EOptionSpv | EOptionVulkanRules | EOptionLinkProgram ) | ) |
Constructor.
Definition at line 65 of file CompilerLinker.cpp.
| void AeonGames::CompilerLinker::AddShaderSource | ( | EShLanguage | aStage, |
| const char * | aSource ) |
Add GLSL source code for a shader stage.
Definition at line 85 of file CompilerLinker.cpp.
| CompilerLinker::FailCode AeonGames::CompilerLinker::CompileAndLink | ( | ) |
Compile all added shader sources and link into a program.
Definition at line 145 of file CompilerLinker.cpp.
| const std::string & AeonGames::CompilerLinker::GetLog | ( | ) | const |
Get the compilation/link log output.
Definition at line 261 of file CompilerLinker.cpp.
| const std::vector< uint32_t > & AeonGames::CompilerLinker::GetSpirV | ( | EShLanguage | aStage | ) | const |
Get the compiled SPIR-V bytecode for a shader stage.
Definition at line 256 of file CompilerLinker.cpp.
| void AeonGames::CompilerLinker::RemoveShaderSource | ( | EShLanguage | aStage | ) |
Remove the shader source for a given stage.
Definition at line 90 of file CompilerLinker.cpp.