Commit 48102b2b by Cody Northrop Committed by Commit Bot

Perf: Add Candy Crush trace

TBR: jmadill@chromium.org,nguyenmh@google.com,tobine@google.com Test: angle_perftest --gtest_filter="*candy*" Bug: b/150458396 Change-Id: I79c86b8d111ef55528da2ec5f0ac3a39428a1667 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2223658Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent b59db10a
{
"src/tests/perf_tests/restricted_traces/candy_crush_500.tar.gz.sha1":
"df8be1c5112ba9d623b94e682d8fa72b",
"src/tests/perf_tests/restricted_traces/egypt_1500.tar.gz.sha1":
"bd3935d0237466e6c80b450900bba67d",
"src/tests/perf_tests/restricted_traces/gen_restricted_traces.py":
......@@ -6,11 +8,11 @@
"src/tests/perf_tests/restricted_traces/manhattan_10.tar.gz.sha1":
"b4d333cd5cf3977c339350be0a819928",
"src/tests/perf_tests/restricted_traces/restricted_traces.json":
"a0ecf2482bfcbd61575909fce8bc252a",
"95edbf8e21748fa2f3bf0a77016d0511",
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.gni":
"026949dc612a6293f29f19d7453e368b",
"16fe33a4ec6e109a05461d4f5276feb2",
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.h":
"5a8c9505c6dec35e9e266bc81549e829",
"e59a1290ee3bdf627b9ea34dfbac440f",
"src/tests/perf_tests/restricted_traces/subway_surfer_500.tar.gz.sha1":
"a7d9e6db6a74b9a927677f7b91307316",
"src/tests/perf_tests/restricted_traces/temple_run_300.tar.gz.sha1":
......
a5c03ab4ca16b3cd3666d1360ad0ce633d113436
\ No newline at end of file
......@@ -11,6 +11,7 @@
"manhattan_10",
"temple_run_300",
"trex_200",
"subway_surfer_500"
"subway_surfer_500",
"candy_crush_500"
]
}
......@@ -14,4 +14,5 @@ angle_restricted_traces = [
"temple_run_300 3",
"trex_200 1",
"subway_surfer_500 4",
"candy_crush_500 2",
]
......@@ -10,6 +10,7 @@
#ifndef ANGLE_RESTRICTED_TRACES_H_
#define ANGLE_RESTRICTED_TRACES_H_
#include "candy_crush_500/candy_crush_500_capture_context2.h"
#include "egypt_1500/egypt_1500_capture_context1.h"
#include "manhattan_10/manhattan_10_capture_context1.h"
#include "subway_surfer_500/subway_surfer_500_capture_context4.h"
......@@ -25,6 +26,7 @@ enum class RestrictedTraceID
temple_run_300,
trex_200,
subway_surfer_500,
candy_crush_500,
InvalidEnum,
EnumCount = InvalidEnum
};
......@@ -55,7 +57,9 @@ constexpr angle::PackedEnumMap<RestrictedTraceID, TraceInfo> kTraceInfos = {
{trex_200::kReplayFrameStart, trex_200::kReplayFrameEnd, "trex_200"}},
{RestrictedTraceID::subway_surfer_500,
{subway_surfer_500::kReplayFrameStart, subway_surfer_500::kReplayFrameEnd,
"subway_surfer_500"}}};
"subway_surfer_500"}},
{RestrictedTraceID::candy_crush_500,
{candy_crush_500::kReplayFrameStart, candy_crush_500::kReplayFrameEnd, "candy_crush_500"}}};
using DecompressCallback = uint8_t *(*)(const std::vector<uint8_t> &);
using FramebufferChangeCallback = void (*)(void *userData, GLenum target, GLuint framebuffer);
......@@ -79,6 +83,9 @@ inline void ReplayFrame(RestrictedTraceID traceID, uint32_t frameIndex)
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::ReplayContext4Frame(frameIndex);
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::ReplayContext2Frame(frameIndex);
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......@@ -105,6 +112,9 @@ inline void ResetReplay(RestrictedTraceID traceID)
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::ResetContext4Replay();
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::ResetContext2Replay();
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......@@ -131,6 +141,9 @@ inline void SetupReplay(RestrictedTraceID traceID)
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::SetupContext4Replay();
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::SetupContext2Replay();
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......@@ -157,6 +170,9 @@ inline void SetBinaryDataDir(RestrictedTraceID traceID, const char *dataDir)
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::SetBinaryDataDir(dataDir);
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::SetBinaryDataDir(dataDir);
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......@@ -183,6 +199,9 @@ inline void SetBinaryDataDecompressCallback(RestrictedTraceID traceID, Decompres
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::SetBinaryDataDecompressCallback(callback);
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::SetBinaryDataDecompressCallback(callback);
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......@@ -211,6 +230,9 @@ inline void SetFramebufferChangeCallback(RestrictedTraceID traceID,
case RestrictedTraceID::subway_surfer_500:
subway_surfer_500::SetFramebufferChangeCallback(userData, callback);
break;
case RestrictedTraceID::candy_crush_500:
candy_crush_500::SetFramebufferChangeCallback(userData, callback);
break;
default:
fprintf(stderr, "Error in switch.\n");
assert(0);
......
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