conditional compiling and multithreading
Some checks failed
Main / build (push) Has been cancelled

This commit is contained in:
Jorijn van der Graaf 2025-05-03 01:20:31 +02:00
commit 52436399e8
9 changed files with 386 additions and 156 deletions

View file

@ -36,6 +36,9 @@ Shader::Shader(fs::path path, std::string entrypoint, EShLanguage type): path(pa
}
void Shader::Compile(fs::path outputDir) {
if(!fs::exists((outputDir/path.filename()).replace_extension("spirv")) || fs::last_write_time(path) > fs::last_write_time((outputDir/path.filename()).replace_extension("spirv"))) {
return;
}
glslang::InitializeProcess();
EShMessages messages = static_cast<EShMessages>(EShMsgDefault | EShMsgVulkanRules | EShMsgSpvRules);
std::ifstream fileStream(path, std::ios::in | std::ios::binary);