Просмотр исходного кода

Correct metallib file extensions.

Eric Mellino 8 лет назад
Родитель
Сommit
14842f668e
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/ShaderGen.App/Program.cs

+ 2 - 1
src/ShaderGen.App/Program.cs

@@ -357,7 +357,8 @@ namespace ShaderGen.App
 
         private static bool CompileMetal(string shaderPath, out string path)
         {
-            string outputPath = shaderPath + ".metallib";
+            string shaderPathWithoutExtension = Path.GetFileNameWithoutExtension(shaderPath);
+            string outputPath = shaderPathWithoutExtension + ".metallib";
             string bitcodePath = Path.GetTempFileName();
             string metalArgs = $"-x metal -o {bitcodePath} {shaderPath}";
             try