Commit 9a257801 by Geoff Lang Committed by Commit Bot

Write relative paths with forward slashes to the code generation hashes.

This should avoid generating diffs when running the code generation with different source directories or on different platforms. BUG=angleproject:2695 Change-Id: I67776883bdbeb867a49bea00f16998c04f7857b4 Reviewed-on: https://chromium-review.googlesource.com/1127355 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5695a5b2
...@@ -22,9 +22,18 @@ def get_child_script_dirname(script): ...@@ -22,9 +22,18 @@ def get_child_script_dirname(script):
# All script names are relative to ANGLE's root # All script names are relative to ANGLE's root
return os.path.dirname(os.path.abspath(os.path.join(root_dir, script))) return os.path.dirname(os.path.abspath(os.path.join(root_dir, script)))
# Replace all backslashes with forward slashes to be platform independent
def clean_path_slashes(path):
return path.replace("\\", "/")
# Takes a script input file name which is relative to the code generation script's directory and
# changes it to be relative to the angle root directory
def rebase_script_input_path(script_path, input_file_path):
return os.path.relpath(os.path.join(os.path.dirname(script_path), input_file_path), root_dir);
def grab_from_script(script, param): def grab_from_script(script, param):
res = subprocess.check_output(['python', script, param]).strip() res = subprocess.check_output(['python', script, param]).strip()
return [os.path.abspath(os.path.join(os.path.dirname(script), name)) for name in res.split(',')] return [clean_path_slashes(rebase_script_input_path(script, name)) for name in res.split(',')]
def auto_script(script): def auto_script(script):
# Set the CWD to the script directory. # Set the CWD to the script directory.
......
...@@ -69,12 +69,12 @@ ...@@ -69,12 +69,12 @@
"be1ca0bd596cf826d8f38d110fba35b0", "be1ca0bd596cf826d8f38d110fba35b0",
"Vulkan format:src/libANGLE/renderer/vulkan/vk_format_map.json": "Vulkan format:src/libANGLE/renderer/vulkan/vk_format_map.json":
"8b02327195f831c782b0a30b36b589d6", "8b02327195f831c782b0a30b36b589d6",
"Vulkan internal shader programs:C:\\src\\angle\\src\\libANGLE\\renderer\\vulkan\\shaders\\src\\FullScreenQuad.vert":
"ab897aa9eb45f83f66080ee082e7d51e",
"Vulkan internal shader programs:C:\\src\\angle\\src\\libANGLE\\renderer\\vulkan\\shaders\\src\\PushConstantColor.frag":
"3b931f51bfee8310f3d6497d5c9ed8a1",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/gen_vk_internal_shaders.py": "Vulkan internal shader programs:src/libANGLE/renderer/vulkan/gen_vk_internal_shaders.py":
"d651e28ab62477029093152e37ed49c9", "d651e28ab62477029093152e37ed49c9",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/FullScreenQuad.vert":
"ab897aa9eb45f83f66080ee082e7d51e",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/PushConstantColor.frag":
"3b931f51bfee8310f3d6497d5c9ed8a1",
"Vulkan mandatory format support table:src/libANGLE/renderer/angle_format.py": "Vulkan mandatory format support table:src/libANGLE/renderer/angle_format.py":
"ddf4dae07bfad22bbf13f4b14e43d8f4", "ddf4dae07bfad22bbf13f4b14e43d8f4",
"Vulkan mandatory format support table:src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py": "Vulkan mandatory format support table:src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment