Print an error when SPIR-V is requested and ENABLE_SPIRV=0 is set
This case fails slightly less silently now. Also make ENABLE_OPT depend on ENABLE_SPIRV, since when there's no SPIR-V optimization doesn't really make sense.
This commit is contained in:
parent
467ce01c71
commit
15ebcea676
2 changed files with 5 additions and 3 deletions
|
|
@ -1507,9 +1507,9 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
|
|||
|
||||
std::vector<std::string> outputFiles;
|
||||
|
||||
#ifdef ENABLE_SPIRV
|
||||
// Dump SPIR-V
|
||||
if (Options & EOptionSpv) {
|
||||
#ifdef ENABLE_SPIRV
|
||||
CompileOrLinkFailed.fetch_or(CompileFailed);
|
||||
CompileOrLinkFailed.fetch_or(LinkFailed);
|
||||
if (static_cast<bool>(CompileOrLinkFailed.load()))
|
||||
|
|
@ -1569,8 +1569,10 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
Error("This configuration of glslang does not have SPIR-V support");
|
||||
#endif
|
||||
}
|
||||
|
||||
CompileOrLinkFailed.fetch_or(CompileFailed);
|
||||
CompileOrLinkFailed.fetch_or(LinkFailed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue