Emit SPIR-V shaders on macOS
This commit is contained in:
parent
f6df3d23b3
commit
45977b4ac1
1 changed files with 1 additions and 7 deletions
|
@ -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);
|
||||||
|
|
Reference in a new issue