Add SPIR-V version to compile flags after debug info

This commit is contained in:
baldurk
2024-11-05 10:12:16 +00:00
parent ec7ecf6896
commit e4bd840125
@@ -1035,9 +1035,6 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
if(!cmdline.empty())
reflection.debugInfo.compileFlags.flags = {{"@cmdline", cmdline}};
reflection.debugInfo.compileFlags.flags.push_back(
{"@spirver", StringFormat::Fmt("spirv%d.%d", m_MajorVersion, m_MinorVersion)});
reflection.debugInfo.entrySourceName = entryPoint;
{
@@ -1055,6 +1052,9 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
}
}
reflection.debugInfo.compileFlags.flags.push_back(
{"@spirver", StringFormat::Fmt("spirv%d.%d", m_MajorVersion, m_MinorVersion)});
PreprocessLineDirectives(reflection.debugInfo.files);
// we do a mini-preprocess of the files from the debug info to handle #line directives.