Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions backends/vulkan/runtime/gen_vulkan_spv.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ def process_shader(shader_paths_pair):
output_file.write(output_text)

if cache_dir is not None:
# Otherwise, store the generated and source GLSL files in the cache
shutil.copyfile(source_glsl, cached_source_glsl)
# Otherwise, store the generated GLSL files in the cache
shutil.copyfile(glsl_out_path, cached_glsl_out_path)

# If no GLSL compiler is specified, then only write out the generated GLSL shaders.
Expand Down Expand Up @@ -852,6 +851,15 @@ def process_shader(shader_paths_pair):
):
output_file_map[spv_out_path] = glsl_out_path

# Save all source GLSL files to the cache. Only do this at the very end since
# multiple variants may use the same source file.
if cache_dir is not None:
for _, source_glsl in self.glsl_src_files.items():
cached_source_glsl = os.path.join(
cache_dir, os.path.basename(source_glsl) + ".t"
)
shutil.copyfile(source_glsl, cached_source_glsl)

return output_file_map


Expand Down
Loading