blob: 2b23dadab21d6128e6415bfe12940ebfe06ab299 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env python3
import subprocess
import sys
for args in [['slangc',
'-target', 'wgsl',
'-stage', '{}'.format(stage),
'-entry', '{}Main'.format(stage),
'-o', 'shader.{}.wgsl'.format(stage),
'shader.slang']
for stage in ['vertex', 'fragment']]:
print("Running '{}'...".format(' '.join(args)))
result = subprocess.run(args)
if result.returncode != 0:
print('Failed!')
sys.exit(1)
else:
print('Succeeded!')
|