Adjust compiled spv file name

This commit is contained in:
Sascha Willems 2025-02-09 19:59:27 +01:00
parent e9673f1ac3
commit 9f38b820cc

View file

@ -42,6 +42,7 @@ for root, dirs, files in os.walk(dir_path):
if file.endswith(".slang"): if file.endswith(".slang"):
input_file = os.path.join(root, file) input_file = os.path.join(root, file)
output_file = input_file + ".spv" output_file = input_file + ".spv"
output_file = output_file.replace(".slang", "")
res = subprocess.call("%s %s -profile glsl_460 -target spirv -o %s -entry %s" % (compiler_path, input_file, output_file, "main"), shell=True) res = subprocess.call("%s %s -profile glsl_460 -target spirv -o %s -entry %s" % (compiler_path, input_file, output_file, "main"), shell=True)
if res != 0: if res != 0:
sys.exit(res) sys.exit(res)