mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Traces: Move up from tests/perf_tests/ to tests/.
The trace tests aren't strictly for performance. Since we'll be using them for correctenss testing as well it makes sense to move them out of the perf_tests/ folder. Also renames RestrictedTraceTests.md to README.md so it'll load automatically in gitiles. Bug: angleproject:4090 Bug: b/168049670 Change-Id: I8be9f1d831489a9abf534d049a93441687850142 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416913 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
4
DEPS
4
DEPS
@@ -498,8 +498,8 @@ hooks = [
|
||||
'pattern': '\\.sha1',
|
||||
'condition': 'checkout_angle_internal',
|
||||
'action': [ 'python',
|
||||
'src/tests/perf_tests/restricted_traces/download_restricted_traces.py',
|
||||
'src/tests/perf_tests/restricted_traces',
|
||||
'src/tests/restricted_traces/download_restricted_traces.py',
|
||||
'src/tests/restricted_traces',
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"scripts/egl_angle_ext.xml":
|
||||
"087d6a3996a91fbb0b664cac57c50c4c",
|
||||
"scripts/generate_loader.py":
|
||||
"92c731390cf5c0305ea57a3661a01240",
|
||||
"5533a717e679c558be6985a5cb016ad2",
|
||||
"scripts/gl.xml":
|
||||
"e74a595068cbdd6064300be1e71b7cc9",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
@@ -17,13 +17,13 @@
|
||||
"419041385faafafc4299cd6b5b8da642",
|
||||
"src/libEGL/egl_loader_autogen.h":
|
||||
"01035f491f6692446c882504c3d20792",
|
||||
"src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.cpp":
|
||||
"src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
|
||||
"929f135ba9ba7717e76552c9e76f0f2f",
|
||||
"src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.h":
|
||||
"src/tests/restricted_traces/trace_egl_loader_autogen.h":
|
||||
"af2eb06cc8de3456b7bfde497b04c0c4",
|
||||
"src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.cpp":
|
||||
"src/tests/restricted_traces/trace_gles_loader_autogen.cpp":
|
||||
"f989f0d3e94d1ae985cfc9514cea8d48",
|
||||
"src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.h":
|
||||
"src/tests/restricted_traces/trace_gles_loader_autogen.h":
|
||||
"90da6d113a8248e148bf3a3853192292",
|
||||
"util/egl_loader_autogen.cpp":
|
||||
"e10da66fdf789e6c52dee1f9e1cd5a68",
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
{
|
||||
"src/tests/perf_tests/restricted_traces/angry_birds_2_1500.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/angry_birds_2_1500.tar.gz.sha1":
|
||||
"44fc5437c4a84012e338b3da4b6fc28a",
|
||||
"src/tests/perf_tests/restricted_traces/candy_crush_500.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/candy_crush_500.tar.gz.sha1":
|
||||
"ef00d8872fe818250df07f761d440bfb",
|
||||
"src/tests/perf_tests/restricted_traces/cod_mobile.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/cod_mobile.tar.gz.sha1":
|
||||
"dffd3bed0d0e53481f43b414309bf152",
|
||||
"src/tests/perf_tests/restricted_traces/egypt_1500.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/egypt_1500.tar.gz.sha1":
|
||||
"1d80caa37b937f83c95cd053b1bdd4ac",
|
||||
"src/tests/perf_tests/restricted_traces/gen_restricted_traces.py":
|
||||
"79d6e6bcdcea1bf7236091183d34dd9e",
|
||||
"src/tests/perf_tests/restricted_traces/manhattan_10.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/gen_restricted_traces.py":
|
||||
"321e6bb9078501db78299c54980f96ac",
|
||||
"src/tests/restricted_traces/manhattan_10.tar.gz.sha1":
|
||||
"752781119592a190cc02b773adf38fc3",
|
||||
"src/tests/perf_tests/restricted_traces/mobile_legends.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/mobile_legends.tar.gz.sha1":
|
||||
"a3fe48a3acc2165a7fb3eb6cf01b441f",
|
||||
"src/tests/perf_tests/restricted_traces/nba2k20_800.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/nba2k20_800.tar.gz.sha1":
|
||||
"03df0dcf41c18bc59edfc0b088ca4a87",
|
||||
"src/tests/perf_tests/restricted_traces/restricted_traces.json":
|
||||
"src/tests/restricted_traces/restricted_traces.json":
|
||||
"60be7da4acc21fd21e715f941fe9ba78",
|
||||
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.cpp":
|
||||
"src/tests/restricted_traces/restricted_traces_autogen.cpp":
|
||||
"a82eccc731512d0db843799b0190dd72",
|
||||
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.gni":
|
||||
"src/tests/restricted_traces/restricted_traces_autogen.gni":
|
||||
"58f17776b329492ba094e809cffbcf2a",
|
||||
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.h":
|
||||
"src/tests/restricted_traces/restricted_traces_autogen.h":
|
||||
"cf1a5ee60842ea8367225facc10c1ae3",
|
||||
"src/tests/perf_tests/restricted_traces/subway_surfer_500.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/subway_surfer_500.tar.gz.sha1":
|
||||
"a47a797dd227f5025439b47cee80dbc9",
|
||||
"src/tests/perf_tests/restricted_traces/temple_run_300.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/temple_run_300.tar.gz.sha1":
|
||||
"e912c0a0e93efe73088211d63b4a30af",
|
||||
"src/tests/perf_tests/restricted_traces/trex_200.tar.gz.sha1":
|
||||
"src/tests/restricted_traces/trex_200.tar.gz.sha1":
|
||||
"ca2d91a527f4a4317f944afc96c35268"
|
||||
}
|
||||
@@ -227,7 +227,7 @@ def gen_util_gles_and_egl_loaders():
|
||||
|
||||
|
||||
def gen_trace_gles_and_egl_loaders():
|
||||
path = os.path.join("..", "src", "tests", "perf_tests", "restricted_traces")
|
||||
path = os.path.join("..", "src", "tests", "restricted_traces")
|
||||
export = "ANGLE_TRACE_EXPORT "
|
||||
lib = "ANGLE_RESTRICTED_TRACES"
|
||||
gen_gles_loader(trace_gles_preamble, path, lib, export, "t_", "trace_")
|
||||
@@ -283,10 +283,10 @@ def main():
|
||||
'../util/gles_loader_autogen.h',
|
||||
'../util/windows/wgl_loader_autogen.cpp',
|
||||
'../util/windows/wgl_loader_autogen.h',
|
||||
'../src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.cpp',
|
||||
'../src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.h',
|
||||
'../src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.cpp',
|
||||
'../src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.h',
|
||||
'../src/tests/restricted_traces/trace_egl_loader_autogen.cpp',
|
||||
'../src/tests/restricted_traces/trace_egl_loader_autogen.h',
|
||||
'../src/tests/restricted_traces/trace_gles_loader_autogen.cpp',
|
||||
'../src/tests/restricted_traces/trace_gles_loader_autogen.h',
|
||||
]
|
||||
|
||||
if sys.argv[1] == 'inputs':
|
||||
|
||||
@@ -114,7 +114,7 @@ generators = {
|
||||
'proc table':
|
||||
'scripts/gen_proc_table.py',
|
||||
'restricted traces':
|
||||
'src/tests/perf_tests/restricted_traces/gen_restricted_traces.py',
|
||||
'src/tests/restricted_traces/gen_restricted_traces.py',
|
||||
'Static builtins':
|
||||
'src/compiler/translator/gen_builtin_symbols.py',
|
||||
'uniform type':
|
||||
|
||||
@@ -12,6 +12,8 @@ declare_args() {
|
||||
build_angle_deqp_tests = false
|
||||
build_angle_gles1_conform_tests = false
|
||||
build_angle_trace_perf_tests = false
|
||||
build_angle_perftests =
|
||||
is_win || is_linux || is_chromeos || is_android || is_mac || is_fuchsia
|
||||
}
|
||||
|
||||
angle_test("test_utils_unittest_helper") {
|
||||
@@ -283,89 +285,26 @@ if (is_win || is_linux || is_chromeos || is_android || is_mac) {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_win || is_linux || is_chromeos || is_android || is_mac || is_fuchsia) {
|
||||
if (build_angle_perftests) {
|
||||
import("angle_perftests.gni")
|
||||
|
||||
if (build_angle_trace_perf_tests) {
|
||||
angle_shared_library("angle_restricted_traces") {
|
||||
testonly = true
|
||||
|
||||
# Imports "angle_restricted_traces"
|
||||
import("perf_tests/restricted_traces/restricted_traces_autogen.gni")
|
||||
sources = [
|
||||
"perf_tests/restricted_traces/angle_trace_gl.h",
|
||||
"perf_tests/restricted_traces/restricted_traces_autogen.cpp",
|
||||
"perf_tests/restricted_traces/restricted_traces_autogen.h",
|
||||
"perf_tests/restricted_traces/trace_egl_loader_autogen.cpp",
|
||||
"perf_tests/restricted_traces/trace_egl_loader_autogen.h",
|
||||
"perf_tests/restricted_traces/trace_gles_loader_autogen.cpp",
|
||||
"perf_tests/restricted_traces/trace_gles_loader_autogen.h",
|
||||
]
|
||||
|
||||
data = []
|
||||
defines = [ "ANGLE_TRACE_IMPLEMENTATION" ]
|
||||
|
||||
include_dirs = [ "perf_tests/restricted_traces" ]
|
||||
|
||||
foreach(_test_info, angle_restricted_traces) {
|
||||
_test_and_ctx = []
|
||||
_test_and_ctx = string_split(_test_info)
|
||||
_test = _test_and_ctx[0]
|
||||
_ctx = _test_and_ctx[1]
|
||||
_test_dir = "perf_tests/restricted_traces/${_test}"
|
||||
_test_ctx = "${_test_dir}/${_test}_capture_context${_ctx}"
|
||||
|
||||
# Similar to capture replay sample, use the file index for sources
|
||||
sources +=
|
||||
rebase_path(read_file("${_test_ctx}_files.txt", "list lines"),
|
||||
".",
|
||||
"${_test_dir}") +
|
||||
[
|
||||
"${_test_ctx}.cpp",
|
||||
"${_test_ctx}.h",
|
||||
]
|
||||
|
||||
data += [ "${_test_dir}/${_test}_capture_context${_ctx}.angledata.gz" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
"$angle_root:angle_common",
|
||||
"$angle_root/util:angle_util",
|
||||
]
|
||||
suppressed_configs +=
|
||||
[ "$angle_root:constructor_and_destructor_warnings" ]
|
||||
|
||||
# Disable optimization in the trace perf tests to avoid optimizing huge files.
|
||||
if (!is_debug) {
|
||||
suppressed_configs += [
|
||||
"//build/config/compiler:afdo",
|
||||
"//build/config/compiler:afdo_optimize_size",
|
||||
"//build/config/compiler:default_optimization",
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
]
|
||||
configs += [ "//build/config/compiler:no_optimize" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
angle_source_set("angle_trace_perftests") {
|
||||
testonly = true
|
||||
if (build_angle_trace_perf_tests) {
|
||||
sources = [ "perf_tests/TracePerfTest.cpp" ]
|
||||
|
||||
if (is_android) {
|
||||
_trace_data_path = "/sdcard/chromium_tests_root/third_party/angle/src/tests/perf_tests/restricted_traces"
|
||||
_trace_data_path = "/sdcard/chromium_tests_root/third_party/angle/src/tests/restricted_traces"
|
||||
} else {
|
||||
_trace_data_path =
|
||||
rebase_path("perf_tests/restricted_traces", root_out_dir)
|
||||
_trace_data_path = rebase_path("restricted_traces", root_out_dir)
|
||||
}
|
||||
|
||||
defines = [ "ANGLE_TRACE_DATA_DIR=\"${_trace_data_path}\"" ]
|
||||
deps = [
|
||||
":angle_perftests_shared",
|
||||
":angle_restricted_traces",
|
||||
"$angle_root:angle_compression",
|
||||
"$angle_root/util:angle_png_utils",
|
||||
"restricted_traces:angle_restricted_traces",
|
||||
]
|
||||
suppressed_configs +=
|
||||
[ "$angle_root:constructor_and_destructor_warnings" ]
|
||||
|
||||
@@ -40,6 +40,6 @@ ANGLE implements a no-op driver for OpenGL, D3D11 and Vulkan. To run on these co
|
||||
* [`TextureBenchmark`](TexturesPerf.cpp): Tests Texture state change performance.
|
||||
* [`LinkProgramBenchmark`](LinkProgramPerfTest.cpp): Tests performance of `glLinkProgram`.
|
||||
* [`glmark2`](glmark2.cpp): Runs the glmark2 benchmark.
|
||||
* [`TracePerfTest`](TracePerfTest.cpp): Runs replays of restricted traces, not available publicly. To enable, read more in [`RestrictedTraceTests`](restricted_traces/RestrictedTraceTests.md)
|
||||
* [`TracePerfTest`](TracePerfTest.cpp): Runs replays of restricted traces, not available publicly. To enable, read more in [`RestrictedTraceTests`](../restricted_traces/README.md)
|
||||
|
||||
Many other tests can be found that have documentation in their classes.
|
||||
|
||||
65
src/tests/restricted_traces/BUILD.gn
Normal file
65
src/tests/restricted_traces/BUILD.gn
Normal file
@@ -0,0 +1,65 @@
|
||||
# Copyright 2020 The ANGLE Project Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
# Contains the build rules for confidential trace tests.
|
||||
|
||||
import("../../../gni/angle.gni")
|
||||
|
||||
angle_shared_library("angle_restricted_traces") {
|
||||
testonly = true
|
||||
|
||||
# Imports "angle_restricted_traces"
|
||||
import("restricted_traces_autogen.gni")
|
||||
sources = [
|
||||
"angle_trace_gl.h",
|
||||
"restricted_traces_autogen.cpp",
|
||||
"restricted_traces_autogen.h",
|
||||
"trace_egl_loader_autogen.cpp",
|
||||
"trace_egl_loader_autogen.h",
|
||||
"trace_gles_loader_autogen.cpp",
|
||||
"trace_gles_loader_autogen.h",
|
||||
]
|
||||
|
||||
data = []
|
||||
defines = [ "ANGLE_TRACE_IMPLEMENTATION" ]
|
||||
|
||||
include_dirs = [ "." ]
|
||||
|
||||
foreach(_test_info, angle_restricted_traces) {
|
||||
_test_and_ctx = []
|
||||
_test_and_ctx = string_split(_test_info)
|
||||
_test = _test_and_ctx[0]
|
||||
_ctx = _test_and_ctx[1]
|
||||
_test_dir = "${_test}"
|
||||
_test_ctx = "${_test_dir}/${_test}_capture_context${_ctx}"
|
||||
|
||||
# Similar to capture replay sample, use the file index for sources
|
||||
sources += rebase_path(read_file("${_test_ctx}_files.txt", "list lines"),
|
||||
".",
|
||||
"${_test_dir}") +
|
||||
[
|
||||
"${_test_ctx}.cpp",
|
||||
"${_test_ctx}.h",
|
||||
]
|
||||
|
||||
data += [ "${_test_dir}/${_test}_capture_context${_ctx}.angledata.gz" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
"$angle_root:angle_common",
|
||||
"$angle_root/util:angle_util",
|
||||
]
|
||||
suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ]
|
||||
|
||||
# Disable optimization in the trace perf tests to avoid optimizing huge files.
|
||||
if (!is_debug) {
|
||||
suppressed_configs += [
|
||||
"//build/config/compiler:afdo",
|
||||
"//build/config/compiler:afdo_optimize_size",
|
||||
"//build/config/compiler:default_optimization",
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
]
|
||||
configs += [ "//build/config/compiler:no_optimize" ]
|
||||
}
|
||||
}
|
||||
@@ -67,16 +67,16 @@ cd out/install/$PLATFORM/lib
|
||||
python ../../../../scripts/refresh_angle_libs.py
|
||||
|
||||
# TRex
|
||||
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/trex_200
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/trex_200 ANGLE_CAPTURE_FRAME_START=200 ANGLE_CAPTURE_FRAME_END=210 ANGLE_CAPTURE_LABEL=trex_200 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
|
||||
mkdir -p ../../../../../angle/src/tests/restricted_traces/trex_200
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/trex_200 ANGLE_CAPTURE_FRAME_START=200 ANGLE_CAPTURE_FRAME_END=210 ANGLE_CAPTURE_LABEL=trex_200 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
|
||||
|
||||
# Manhattan
|
||||
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/manhattan_10
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/manhattan_10 ANGLE_CAPTURE_FRAME_START=10 ANGLE_CAPTURE_FRAME_END=20 ANGLE_CAPTURE_LABEL=manhattan_10 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
|
||||
mkdir -p ../../../../../angle/src/tests/restricted_traces/manhattan_10
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/manhattan_10 ANGLE_CAPTURE_FRAME_START=10 ANGLE_CAPTURE_FRAME_END=20 ANGLE_CAPTURE_LABEL=manhattan_10 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
|
||||
|
||||
# Egypt
|
||||
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/egypt_1500
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/egypt_1500 ANGLE_CAPTURE_FRAME_START=1500 ANGLE_CAPTURE_FRAME_END=1510 ANGLE_CAPTURE_LABEL=egypt_1500 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_egypt --ei -frame_step_time=40
|
||||
mkdir -p ../../../../../angle/src/tests/restricted_traces/egypt_1500
|
||||
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/egypt_1500 ANGLE_CAPTURE_FRAME_START=1500 ANGLE_CAPTURE_FRAME_END=1510 ANGLE_CAPTURE_LABEL=egypt_1500 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_egypt --ei -frame_step_time=40
|
||||
```
|
||||
|
||||
## Upload to the cloud
|
||||
@@ -84,7 +84,7 @@ ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_trace
|
||||
Starting from you ANGLE root directory:
|
||||
|
||||
```
|
||||
cd src/tests/perf_tests/restricted_traces
|
||||
cd src/tests/restricted_traces
|
||||
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_200
|
||||
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_10
|
||||
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive egypt_1500
|
||||
0
src/tests/perf_tests/restricted_traces/download_restricted_traces.py → src/tests/restricted_traces/download_restricted_traces.py
Executable file → Normal file
0
src/tests/perf_tests/restricted_traces/download_restricted_traces.py → src/tests/restricted_traces/download_restricted_traces.py
Executable file → Normal file
@@ -193,6 +193,7 @@ void SetBinaryDataDecompressCallback(RestrictedTraceID traceID, DecompressCallba
|
||||
}} // namespace angle
|
||||
"""
|
||||
|
||||
|
||||
def reject_duplicate_keys(pairs):
|
||||
found_keys = {}
|
||||
for key, value in pairs:
|
||||
Reference in New Issue
Block a user