Have dxc generate hlsl shaders into hlsl directory

Instead of overwriting the glsl binaries.

Issue: #723
This commit is contained in:
Ben Clayton 2020-05-29 16:12:10 +01:00
parent ca884587a4
commit a4bbe18399

View file

@ -35,13 +35,7 @@ for root, dirs, files in os.walk(dir_path):
for file in files: for file in files:
if file.endswith(".vert") or file.endswith(".frag") or file.endswith(".comp") or file.endswith(".geom") or file.endswith(".tesc") or file.endswith(".tese") or file.endswith(".rgen") or file.endswith(".rchit") or file.endswith(".rmiss"): if file.endswith(".vert") or file.endswith(".frag") or file.endswith(".comp") or file.endswith(".geom") or file.endswith(".tesc") or file.endswith(".tese") or file.endswith(".rgen") or file.endswith(".rchit") or file.endswith(".rmiss"):
hlsl_file = os.path.join(root, file) hlsl_file = os.path.join(root, file)
spv_out = hlsl_file + ".spv"
spv_out = os.path.abspath(os.path.join(dir_path, "..", "glsl", os.path.relpath(hlsl_file, dir_path) + ".spv"))
# Make the spv directory if it does not already exist
spv_dir = os.path.dirname(spv_out)
if not os.path.exists(spv_dir):
os.makedirs(spv_dir)
profile = '' profile = ''
if(hlsl_file.find('.vert') != -1): if(hlsl_file.find('.vert') != -1):