Hash :
2f3e4db8
Author :
Date :
2021-09-02T10:31:13
Capture/Replay: Serialize trace metadata to a JSON file. This will allow us to remove more code auto-generation for the trace tests. The trace info now can be loaded directly from JSON instead of from the autogenerated information. Bug: angleproject:5133 Change-Id: I04e22b9279b19282df274bc8defcd363d0449111 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140218 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_restricted_traces.py using data from restricted_traces.json
//
// 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.
//
// restricted_traces_autogen: Types and enumerations for trace tests.
#ifndef ANGLE_RESTRICTED_TRACES_AUTOGEN_H_
#define ANGLE_RESTRICTED_TRACES_AUTOGEN_H_
#include <EGL/egl.h>
#include <KHR/khrplatform.h>
#include <cstdint>
#include <vector>
#include "restricted_traces_export.h"
namespace trace_angle
{
using GenericProc = void (*)();
using LoadProc = GenericProc(KHRONOS_APIENTRY *)(const char *);
ANGLE_TRACE_LOADER_EXPORT void LoadEGL(LoadProc loadProc);
ANGLE_TRACE_LOADER_EXPORT void LoadGLES(LoadProc loadProc);
static constexpr size_t kTraceInfoMaxNameLen = 128;
static constexpr uint32_t kDefaultReplayContextClientMajorVersion = 3;
static constexpr uint32_t kDefaultReplayContextClientMinorVersion = 1;
static constexpr uint32_t kDefaultReplayDrawSurfaceColorSpace = EGL_COLORSPACE_LINEAR;
struct TraceInfo
{
char name[kTraceInfoMaxNameLen];
uint32_t contextClientMajorVersion;
uint32_t contextClientMinorVersion;
uint32_t frameEnd;
uint32_t frameStart;
uint32_t drawSurfaceWidth;
uint32_t drawSurfaceHeight;
uint32_t drawSurfaceColorSpace;
uint32_t displayPlatformType;
uint32_t displayDeviceType;
int configRedBits;
int configBlueBits;
int configGreenBits;
int configAlphaBits;
int configDepthBits;
int configStencilBits;
bool isBinaryDataCompressed;
bool areClientArraysEnabled;
bool isBindGeneratesResourcesEnabled;
bool isWebGLCompatibilityEnabled;
bool isRobustResourceInitEnabled;
};
ANGLE_TRACE_EXPORT const TraceInfo &GetTraceInfo(const char *traceName);
} // namespace trace_angle
#endif // ANGLE_RESTRICTED_TRACES_AUTOGEN_H_