mirror of https://github.com/AxioDL/metaforce.git
shaderc metal "error" fix
This commit is contained in:
parent
cfd365bebe
commit
efa7463a9a
|
@ -124,7 +124,7 @@ struct ShaderCompiler<PlatformType::Metal> {
|
||||||
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
execlp("xcrun", "xcrun", "-sdk", "macosx", "metal", NULL);
|
execlp("xcrun", "xcrun", "-sdk", "macosx", "metal", "--version", NULL);
|
||||||
/* xcrun returns 72 if metal command not found;
|
/* xcrun returns 72 if metal command not found;
|
||||||
* emulate that if xcrun not found */
|
* emulate that if xcrun not found */
|
||||||
exit(72);
|
exit(72);
|
||||||
|
@ -134,7 +134,7 @@ struct ShaderCompiler<PlatformType::Metal> {
|
||||||
while ((ret = waitpid(pid, &status, 0)) < 0 && errno == EINTR) {}
|
while ((ret = waitpid(pid, &status, 0)) < 0 && errno == EINTR) {}
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return false;
|
return false;
|
||||||
return WEXITSTATUS(status) == 1;
|
return WEXITSTATUS(status) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
|
|
Loading…
Reference in New Issue