Use base name of the generator script in various generated files

Increases compiler cache hits especially in cases where the file is run
during build.

Bug: angleproject:7642
Change-Id: I769dae2d7cca2cf1e238531f4cb356bad41b06dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3880323
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Kimmo Kinnunen 2022-09-08 14:15:10 +03:00 коммит произвёл Angle LUCI CQ
Родитель 1911756760
Коммит 6937ea98cd
30 изменённых файлов: 50 добавлений и 40 удалений

Просмотреть файл

@ -2,7 +2,7 @@
"src/libANGLE/renderer/FormatID_autogen.h":
"40f92bcbd9100ebcbac0fa77db1a23be",
"src/libANGLE/renderer/Format_table_autogen.cpp":
"afe82012cba43b1bab4b40f890b1eb89",
"5cb817bc8865f58824c6a412645e8876",
"src/libANGLE/renderer/angle_format.py":
"2f8fa768088e22b0963bbdf842d3e725",
"src/libANGLE/renderer/angle_format_data.json":
@ -10,5 +10,5 @@
"src/libANGLE/renderer/angle_format_map.json":
"951e1bceaba86eecb5c23173e897d092",
"src/libANGLE/renderer/gen_angle_format_table.py":
"70bdbceee30506d4b14bf52f2bbd8f2b"
"2ec32d6ad86d2dece50bc7db3cd0d807"
}

Просмотреть файл

@ -2,7 +2,7 @@
"src/libANGLE/renderer/angle_format.py":
"2f8fa768088e22b0963bbdf842d3e725",
"src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py":
"b281bb7e6149acdd7e76d8432c537672",
"1c50b4b5c46af329e72eaa07f51be6c9",
"src/libANGLE/renderer/d3d/d3d11/texture_format_data.json":
"6e48f8d410a6cee0423608336154e420",
"src/libANGLE/renderer/d3d/d3d11/texture_format_map.json":

Просмотреть файл

@ -8,5 +8,5 @@
"src/libANGLE/renderer/dxgi_format_map_autogen.cpp":
"974308ca798476dfaa076fb864478310",
"src/libANGLE/renderer/gen_dxgi_format_table.py":
"317faa90fd375c39cc8fbefe897604b3"
"88fbd6be85ea84da8e6fdb709b6a54b7"
}

Просмотреть файл

@ -4,5 +4,5 @@
"src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp":
"eeb085d4abc08e7dd15a1db8807efed6",
"src/compiler/translator/gen_emulated_builtin_function_tables.py":
"0150347bc316e7c3772a7c1492c588b8"
"cdeb72610aefe2e87ecf46cf7617e487"
}

Просмотреть файл

@ -4,7 +4,7 @@
"src/libANGLE/es3_copy_conversion_table_autogen.cpp":
"c8418c317a331e54a6913c407e47aafb",
"src/libANGLE/gen_copy_conversion_table.py":
"0a73b7580342b9e27d4c71ade3af55e5",
"3b1f0182a41af78b44930fb415ff0fb6",
"src/libANGLE/renderer/angle_format.py":
"2f8fa768088e22b0963bbdf842d3e725"
}

Просмотреть файл

@ -6,7 +6,7 @@
"src/libANGLE/format_map_data.json":
"2e5db33b6d6b142b569123f614f3ddb7",
"src/libANGLE/gen_format_map.py":
"2421e2cfb4e074ae3fa6baa031c6394e",
"32b43aedcbad2aa5eaa47052cc8573ac",
"src/libANGLE/renderer/angle_format.py":
"2f8fa768088e22b0963bbdf842d3e725"
}

Просмотреть файл

@ -4,7 +4,7 @@
"src/libANGLE/renderer/angle_format_map.json":
"951e1bceaba86eecb5c23173e897d092",
"src/libANGLE/renderer/gen_angle_format_table.py":
"70bdbceee30506d4b14bf52f2bbd8f2b",
"2ec32d6ad86d2dece50bc7db3cd0d807",
"src/libANGLE/renderer/metal/shaders/blit.metal":
"b35da1cf7e949d02e5a44c6a432c1f06",
"src/libANGLE/renderer/metal/shaders/clear.metal":
@ -22,9 +22,9 @@
"src/libANGLE/renderer/metal/shaders/gen_mipmap.metal":
"fab35deec42fd89ae7a11d2f87b6e0b4",
"src/libANGLE/renderer/metal/shaders/gen_mtl_internal_shaders.py":
"f6f2e180f73efd8f2ee3aaaaf34a71e4",
"039f57f41009d70dacdc3c38449054c8",
"src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc":
"656682dbae2e5eeb940077dcd60a1fd6",
"809dafcfa740027ba1410952432fb0bb",
"src/libANGLE/renderer/metal/shaders/rewrite_indices.metal":
"a29210b023ed3393e1342d94e338d449",
"src/libANGLE/renderer/metal/shaders/visibility.metal":

Просмотреть файл

@ -4,7 +4,7 @@
"src/libANGLE/renderer/angle_format_map.json":
"951e1bceaba86eecb5c23173e897d092",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
"abb2300e5d9d70931e2497f820f64bd5",
"4be55bb374ce9dc939eb2b0bcb177109",
"src/libANGLE/renderer/metal/mtl_format_map.json":
"06930f9f23c7a3da6a72a1013d39bbf8",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":

Просмотреть файл

@ -1,6 +1,6 @@
{
"src/common/spirv/gen_spirv_builder_and_parser.py":
"a1df0a9b252507533ca7ed4e76b8bdd9",
"e95670a30a4eda80a146b61c986fb03c",
"src/common/spirv/spirv_instruction_builder_autogen.cpp":
"1b5f60a24d459e7a30c29cf7acfa2106",
"src/common/spirv/spirv_instruction_builder_autogen.h":

Просмотреть файл

@ -4,5 +4,5 @@
"src/libANGLE/Overlay_font_autogen.h":
"ea11ceeb31a33a1230aad15e46411819",
"src/libANGLE/gen_overlay_fonts.py":
"6387f1a232d03025dd067511f8bc1b00"
"c8fc1c07dff51c29bc7d501e8a60edf4"
}

Просмотреть файл

@ -12,7 +12,7 @@
"src/common/PackedGLEnums_autogen.h":
"81e65899f1a783d0be372b54fadb07be",
"src/common/gen_packed_gl_enums.py":
"27df356513bc2f377b78655113d17c7e",
"3334498103ee8b13fe721519dd8e0742",
"src/common/packed_cl_enums.json":
"65150f52de0ece8f4280bbe4db52bf6f",
"src/common/packed_egl_enums.json":

Просмотреть файл

@ -2,7 +2,7 @@
"scripts/egl_angle_ext.xml":
"083c37ee3e2a2ae047a2344195220629",
"scripts/gen_proc_table.py":
"101d1ce8880be0c061c05c20420d92f5",
"073351265b085943f816498cecaa281c",
"scripts/gl.xml":
"c79f59912f42e96ea958dddb5e029d47",
"scripts/gl_angle_ext.xml":

Просмотреть файл

@ -1,6 +1,6 @@
{
"src/common/gen_uniform_type_table.py":
"f57829d5e5b97ac1dcb8a95316736de9",
"8837f9f3fb0bc37adf015f3a2e446d11",
"src/common/uniform_type_info_autogen.cpp":
"85b351f2d5525d1af422a880e361a2bd"
}

Просмотреть файл

@ -7,6 +7,7 @@
# Code generation for entry point loading tables.
# NOTE: don't run this script directly. Run scripts/run_code_generation.py.
import os
import sys
import registry_xml
@ -254,7 +255,7 @@ def main():
with open(out_file_name_gles, 'w') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml, gl_angle_ext.xml, egl.xml, egl_angle_ext.xml",
includes=includes_gles,
cast="__eglMustCastToProperFunctionPointerType",
@ -291,7 +292,7 @@ def main():
with open(out_file_name, 'w') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name="gl.xml, gl_angle_ext.xml, {}".format(xml_file_name),
includes=includes,
cast=cast,
@ -330,7 +331,7 @@ def main():
with open(out_file_name_cl, 'w') as out_file:
output_cpp = template_map_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name="cl.xml",
includes=includes_cl,
cast="void *",
@ -341,7 +342,9 @@ def main():
with open(out_file_name_cl_map, 'w') as out_file:
output_map = template_map.format(
script_name=sys.argv[0], data_source_name="cl.xml", symbol_maps="\n".join(symbol_maps))
script_name=os.path.basename(sys.argv[0]),
data_source_name="cl.xml",
symbol_maps="\n".join(symbol_maps))
out_file.write(output_map)
out_file.close()

Просмотреть файл

@ -133,7 +133,7 @@ def write_header(enums, path_prefix, file_name, data_source_name, includes, name
header = header_template.format(
content=''.join(content),
data_source_name=data_source_name,
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
file_name=file_name,
include_guard=generate_include_guard(file_name),
includes=includes,
@ -229,7 +229,7 @@ def write_cpp(enums, path_prefix, file_name, data_source_name, namespace, api_en
cpp = cpp_template.format(
content=''.join(content),
data_source_name=data_source_name,
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
file_name=file_name,
header_name=header_name_from_cpp_name(file_name),
namespace=namespace,

Просмотреть файл

@ -7,6 +7,7 @@
# Code generation for OpenGL uniform type info tables.
# NOTE: don't run this script directly. Run scripts/run_code_generation.py.
import os
import sys
all_uniform_types = [
@ -272,7 +273,7 @@ def main():
with open('uniform_type_info_autogen.cpp', 'wt') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
total_count=len(all_uniform_types),
uniform_type_info_data=uniform_type_info_data,
uniform_type_index_cases=uniform_type_index_cases)

Просмотреть файл

@ -224,7 +224,7 @@ class Writer:
# Write out the files.
data_source_base_name = os.path.basename(SPIRV_GRAMMAR_FILE)
builder_template_args = {
'script_name': sys.argv[0],
'script_name': os.path.basename(sys.argv[0]),
'data_source_name': data_source_base_name,
'file_name': SPIRV_BUILDER_FILE,
'file_name_capitalized': remove_chars(SPIRV_BUILDER_FILE.upper(), '_'),
@ -234,7 +234,7 @@ class Writer:
'function_list': ''.join(self.instruction_builder_impl)
}
parser_template_args = {
'script_name': sys.argv[0],
'script_name': os.path.basename(sys.argv[0]),
'data_source_name': data_source_base_name,
'file_name': SPIRV_PARSER_FILE,
'file_name_capitalized': remove_chars(SPIRV_PARSER_FILE.upper(), '_'),

Просмотреть файл

@ -137,7 +137,7 @@ def main():
emulated_functions += gen_emulated_function(item)
hlsl_gen = template_emulated_builtin_functions_hlsl.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name=input_script,
emulated_functions="".join(emulated_functions))

Просмотреть файл

@ -8,6 +8,7 @@
# NOTE: don't run this script directly. Run scripts/run_code_generation.py.
import sys
import os
sys.path.append('renderer')
import angle_format
@ -102,7 +103,7 @@ def main():
with open(out_file_name, 'wt') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name=data_source_name,
texture_format_cases=texture_format_cases)
out_file.write(output_cpp)

Просмотреть файл

@ -9,6 +9,7 @@
# NOTE: don't run this script directly. Run scripts/run_code_generation.py.
import sys
import os
sys.path.append('renderer')
import angle_format
@ -193,7 +194,7 @@ def main():
with open('format_map_autogen.cpp', 'wt') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name=input_script,
es3_data_source_name=combo_data_file,
format_cases=format_cases,

Просмотреть файл

@ -203,7 +203,7 @@ def main():
with open(out_file_h, 'w') as outfile:
outfile.write(
template_out_file_h.format(
script_name=__file__,
script_name=os.path.basename(__file__),
font_file=font_file,
out_file_name=out_file_h,
font_count=len(font_defs),
@ -219,7 +219,7 @@ def main():
with open(out_file_cpp, 'w') as outfile:
outfile.write(
template_out_file_cpp.format(
script_name=__file__,
script_name=os.path.basename(__file__),
font_file=font_file,
out_file_name=out_file_cpp,
total_font_data_size=total_font_data_size,

Просмотреть файл

@ -18,7 +18,7 @@ namespace angle
{
static constexpr rx::FastCopyFunctionMap::Entry BGRAEntry = {angle::FormatID::R8G8B8A8_UNORM,
CopyBGRA8ToRGBA8};
CopyBGRA8ToRGBA8};
static constexpr rx::FastCopyFunctionMap BGRACopyFunctions = {&BGRAEntry, 1};
static constexpr rx::FastCopyFunctionMap NoCopyFunctions;

Просмотреть файл

@ -322,7 +322,7 @@ def main():
angle_format_cases = parse_json_into_switch_angle_format_string(json_map, json_data)
output_cpp = template_texture_format_table_autogen_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
angle_format_info_cases=angle_format_cases,
data_source_name=data_source_name)
with open('texture_format_table_autogen.cpp', 'wt') as out_file:

Просмотреть файл

@ -11,6 +11,7 @@
import angle_format
import json
import math
import os
import pprint
import re
import sys
@ -424,7 +425,7 @@ def main():
angle_format_cases = parse_angle_format_table(all_angle, json_data, angle_to_gl)
switch_data = gen_map_switch_string(gl_to_angle)
output_cpp = template_autogen_inl.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
angle_format_info_cases=angle_format_cases,
angle_format_switch=switch_data,
data_source_name=data_source_name)
@ -435,7 +436,7 @@ def main():
enum_data = gen_enum_string(all_angle)
num_angle_formats = len(all_angle)
output_h = template_autogen_h.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
angle_format_enum=enum_data,
data_source_name=data_source_name,
num_angle_formats=num_angle_formats)

Просмотреть файл

@ -9,6 +9,7 @@
import sys
import angle_format
import os
from functools import reduce
@ -146,7 +147,7 @@ def main():
with open('dxgi_format_map_autogen.cpp', 'wt') as out_file:
output_cpp = template_cpp.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name=input_data,
component_type_cases=component_cases,
format_cases=format_cases)

Просмотреть файл

@ -16,6 +16,7 @@
import json
import math
import os
import pprint
import re
import sys
@ -706,7 +707,7 @@ def main():
caps_init_str = gen_mtl_format_caps_init_string(map_image)
output_cpp = template_autogen_inl.format(
script_name=sys.argv[0],
script_name=os.path.basename(sys.argv[0]),
data_source_name=data_source_name,
angle_image_format_switch=image_switch_data,
mtl_pixel_format_switch=image_mtl_to_angle_switch_data,

Просмотреть файл

@ -56,7 +56,7 @@ def main():
os.chdir(sys.path[0])
boilerplate_code = template_header_boilerplate.format(
script_name=sys.argv[0], copyright_year=datetime.today().year)
script_name=os.path.basename(sys.argv[0]), copyright_year=datetime.today().year)
# -------- Compile shaders -----------
# boiler plate code

Просмотреть файл

@ -95,7 +95,8 @@ def main():
os.chdir(sys.path[0])
boilerplate_code = template_header_boilerplate.format(script_name=sys.argv[0])
boilerplate_code = template_header_boilerplate.format(
script_name=os.path.basename(sys.argv[0]))
# -------- Generate shader constants -----------
angle_to_gl = angle_format.load_inverse_table('../../angle_format_map.json')

Просмотреть файл

@ -14,7 +14,7 @@ static char gDefaultMetallibSrc[] = R"(
# 1 "temp_master_source.metal"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 451 "<built-in>" 3
# 453 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "temp_master_source.metal" 2

Просмотреть файл

@ -11,7 +11,7 @@
# 1 "temp_master_source.metal"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 451 "<built-in>" 3
# 453 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "temp_master_source.metal" 2