Archived
1
Fork 0

Emit SPIR-V shaders on macOS

This commit is contained in:
redstrate 2021-09-13 13:51:36 -04:00
parent f6df3d23b3
commit 45977b4ac1

View file

@ -42,14 +42,8 @@ int main(int argc, char* argv[]) {
ShaderLanguage language; ShaderLanguage language;
CompileOptions options; CompileOptions options;
#ifdef PLATFORM_MACOS
options.is_apple_mobile = (bool)argv[3];
language = ShaderLanguage::MSL;
#else
language = ShaderLanguage::SPIRV; language = ShaderLanguage::SPIRV;
#endif
const auto compiled_source = shader_compiler.compile(ShaderLanguage::GLSL, stage, ShaderSource(buffer.str()), language, options); const auto compiled_source = shader_compiler.compile(ShaderLanguage::GLSL, stage, ShaderSource(buffer.str()), language, options);
if(!compiled_source.has_value()) { if(!compiled_source.has_value()) {
prism::log::error(System::Core, "Error when compiling {}!", source_path); prism::log::error(System::Core, "Error when compiling {}!", source_path);