|
Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Represents a unique shader compilation (input source path + config => Spirv file) More...
#include <foray_shadermanager.hpp>
Public Member Functions | |
| ShaderCompilation (ShaderManager *manager, const osi::Utf8Path &source, const ShaderCompilerConfig &config, uint64_t hash) | |
| Sets SpvPath and updates LastCompile. | |
| void | FindIncludes () |
| Finds all includes and configures them in the watch of the shader manager. | |
| bool | Compile () |
| Invokes the shader compiler. | |
| ECompileCheckResult | NeedsCompile (WriteTimeLookup &compileTimeLookup) |
| Checks for need to recompile. | |
Public Attributes | |
| ShaderManager * | Manager = nullptr |
| Owning manager object. | |
| osi::Utf8Path | SourcePath = {} |
| Source path. | |
| osi::Utf8Path | SpvPath = {} |
| Output path. | |
| std::filesystem::file_time_type | LastCompile = std::filesystem::file_time_type::min() |
| Last successful compile time. | |
| std::filesystem::file_time_type | LastFailedCompile = std::filesystem::file_time_type::min() |
| Time of last failed compile. | |
| std::unordered_set< IncludeFile * > | Includes = {} |
| List of includes. | |
| ShaderCompilerConfig | Config = {} |
| Configuration of the shader compiler. | |
| uint64_t | Hash = 0 |
| Hash identifying the compilation. | |
Represents a unique shader compilation (input source path + config => Spirv file)
| foray::core::ShaderManager::ShaderCompilation::ShaderCompilation | ( | ShaderManager * | manager, |
| const osi::Utf8Path & | source, | ||
| const ShaderCompilerConfig & | config, | ||
| uint64_t | hash | ||
| ) |
Sets SpvPath and updates LastCompile.
| source | Absolute source file path |
| config | Compiler configuration |
| hash | compilation hash |
| bool foray::core::ShaderManager::ShaderCompilation::Compile | ( | ) |
Invokes the shader compiler.
| void foray::core::ShaderManager::ShaderCompilation::FindIncludes | ( | ) |
Finds all includes and configures them in the watch of the shader manager.
| ECompileCheckResult foray::core::ShaderManager::ShaderCompilation::NeedsCompile | ( | WriteTimeLookup & | compileTimeLookup | ) |
Checks for need to recompile.
| compileTimeLookup | Lookup for writetimes of already checked files |
| ShaderCompilerConfig foray::core::ShaderManager::ShaderCompilation::Config = {} |
Configuration of the shader compiler.
| uint64_t foray::core::ShaderManager::ShaderCompilation::Hash = 0 |
Hash identifying the compilation.
| std::unordered_set<IncludeFile*> foray::core::ShaderManager::ShaderCompilation::Includes = {} |
List of includes.
| std::filesystem::file_time_type foray::core::ShaderManager::ShaderCompilation::LastCompile = std::filesystem::file_time_type::min() |
Last successful compile time.
| std::filesystem::file_time_type foray::core::ShaderManager::ShaderCompilation::LastFailedCompile = std::filesystem::file_time_type::min() |
Time of last failed compile.
| ShaderManager* foray::core::ShaderManager::ShaderCompilation::Manager = nullptr |
Owning manager object.
| osi::Utf8Path foray::core::ShaderManager::ShaderCompilation::SourcePath = {} |
Source path.
| osi::Utf8Path foray::core::ShaderManager::ShaderCompilation::SpvPath = {} |
Output path.