Skip to content

Commit bdbad3f

Browse files
authored
Upgrade vulkan
Differential Revision: D77049180 Pull Request resolved: #12355
1 parent 7421555 commit bdbad3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backends/vulkan/runtime/gen_vulkan_spv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,8 @@ def compile_spirv(shader_paths_pair):
877877
src_file_name = shader_paths_pair[0]
878878
# path of template file used for codegen
879879
src_file_fullpath = shader_paths_pair[1][0]
880+
# args used for codegen
881+
codegen_params = shader_paths_pair[1][1]
880882

881883
# Assume that generated files will have the same file extension as the
882884
# source template file.
@@ -917,6 +919,7 @@ def compile_spirv(shader_paths_pair):
917919
shutil.copyfile(cached_spv_out_path, spv_out_path)
918920
return (spv_out_path, gen_out_path)
919921

922+
vk_version = codegen_params.get("VK_VERSION", "1.1")
920923
# Only proceed if a GLSL compiler was specified
921924
if self.glslc_path is not None:
922925
cmd_base = [
@@ -925,7 +928,7 @@ def compile_spirv(shader_paths_pair):
925928
gen_out_path,
926929
"-o",
927930
spv_out_path,
928-
"--target-env=vulkan1.1",
931+
"--target-env=vulkan{}".format(vk_version),
929932
"-Werror",
930933
] + [
931934
arg

0 commit comments

Comments
 (0)