1*8975f5c5SAndroid Build Coastguard Worker // 2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2021 The ANGLE Project Authors. All rights reserved. 3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file. 5*8975f5c5SAndroid Build Coastguard Worker // 6*8975f5c5SAndroid Build Coastguard Worker // trace_fixture.h: 7*8975f5c5SAndroid Build Coastguard Worker // Common code for the ANGLE trace replays. 8*8975f5c5SAndroid Build Coastguard Worker // 9*8975f5c5SAndroid Build Coastguard Worker 10*8975f5c5SAndroid Build Coastguard Worker #ifndef ANGLE_TRACE_FIXTURE_H_ 11*8975f5c5SAndroid Build Coastguard Worker #define ANGLE_TRACE_FIXTURE_H_ 12*8975f5c5SAndroid Build Coastguard Worker 13*8975f5c5SAndroid Build Coastguard Worker #include <EGL/egl.h> 14*8975f5c5SAndroid Build Coastguard Worker #include <EGL/eglext.h> 15*8975f5c5SAndroid Build Coastguard Worker #include <math.h> 16*8975f5c5SAndroid Build Coastguard Worker #include <stddef.h> 17*8975f5c5SAndroid Build Coastguard Worker #include <stdint.h> 18*8975f5c5SAndroid Build Coastguard Worker 19*8975f5c5SAndroid Build Coastguard Worker #include "angle_gl.h" 20*8975f5c5SAndroid Build Coastguard Worker #include "trace_interface.h" 21*8975f5c5SAndroid Build Coastguard Worker #include "traces_export.h" 22*8975f5c5SAndroid Build Coastguard Worker 23*8975f5c5SAndroid Build Coastguard Worker #if defined(__cplusplus) 24*8975f5c5SAndroid Build Coastguard Worker # include <cstdio> 25*8975f5c5SAndroid Build Coastguard Worker # include <cstring> 26*8975f5c5SAndroid Build Coastguard Worker # include <limits> 27*8975f5c5SAndroid Build Coastguard Worker # include <unordered_map> 28*8975f5c5SAndroid Build Coastguard Worker # include <vector> 29*8975f5c5SAndroid Build Coastguard Worker 30*8975f5c5SAndroid Build Coastguard Worker // TODO(jmadill): Consolidate. http://anglebug.com/42266223 31*8975f5c5SAndroid Build Coastguard Worker using BlockIndexesMap = std::unordered_map<GLuint, std::unordered_map<GLuint, GLuint>>; 32*8975f5c5SAndroid Build Coastguard Worker extern BlockIndexesMap gUniformBlockIndexes; 33*8975f5c5SAndroid Build Coastguard Worker using BufferHandleMap = std::unordered_map<GLuint, void *>; 34*8975f5c5SAndroid Build Coastguard Worker extern BufferHandleMap gMappedBufferData; 35*8975f5c5SAndroid Build Coastguard Worker using ClientBufferMap = std::unordered_map<uintptr_t, EGLClientBuffer>; 36*8975f5c5SAndroid Build Coastguard Worker extern ClientBufferMap gClientBufferMap; 37*8975f5c5SAndroid Build Coastguard Worker using EGLImageMap = std::unordered_map<uintptr_t, GLeglImageOES>; 38*8975f5c5SAndroid Build Coastguard Worker extern EGLImageMap gEGLImageMap; 39*8975f5c5SAndroid Build Coastguard Worker using SyncResourceMap = std::unordered_map<uintptr_t, GLsync>; 40*8975f5c5SAndroid Build Coastguard Worker extern SyncResourceMap gSyncMap; 41*8975f5c5SAndroid Build Coastguard Worker using SurfaceMap = std::unordered_map<uintptr_t, EGLSurface>; 42*8975f5c5SAndroid Build Coastguard Worker extern SurfaceMap gSurfaceMap; 43*8975f5c5SAndroid Build Coastguard Worker using ContextMap = std::unordered_map<uintptr_t, EGLContext>; 44*8975f5c5SAndroid Build Coastguard Worker extern ContextMap gContextMap; 45*8975f5c5SAndroid Build Coastguard Worker 46*8975f5c5SAndroid Build Coastguard Worker extern std::string gBinaryDataDir; 47*8975f5c5SAndroid Build Coastguard Worker extern angle::TraceInfo gTraceInfo; 48*8975f5c5SAndroid Build Coastguard Worker extern std::string gTraceGzPath; 49*8975f5c5SAndroid Build Coastguard Worker 50*8975f5c5SAndroid Build Coastguard Worker using ValidateSerializedStateCallback = void (*)(const char *, const char *, uint32_t); 51*8975f5c5SAndroid Build Coastguard Worker 52*8975f5c5SAndroid Build Coastguard Worker extern "C" { 53*8975f5c5SAndroid Build Coastguard Worker 54*8975f5c5SAndroid Build Coastguard Worker // Functions implemented by traces. 55*8975f5c5SAndroid Build Coastguard Worker // "not exported" tag is a hack to get around trace interpreter codegen -_- 56*8975f5c5SAndroid Build Coastguard Worker /* not exported */ void SetupReplay(); 57*8975f5c5SAndroid Build Coastguard Worker /* not exported */ void ReplayFrame(uint32_t frameIndex); 58*8975f5c5SAndroid Build Coastguard Worker /* not exported */ void ResetReplay(); 59*8975f5c5SAndroid Build Coastguard Worker /* not exported */ void FinishReplay(); 60*8975f5c5SAndroid Build Coastguard Worker 61*8975f5c5SAndroid Build Coastguard Worker ANGLE_REPLAY_EXPORT void SetValidateSerializedStateCallback( 62*8975f5c5SAndroid Build Coastguard Worker ValidateSerializedStateCallback callback); 63*8975f5c5SAndroid Build Coastguard Worker 64*8975f5c5SAndroid Build Coastguard Worker // Only defined if serialization is enabled. 65*8975f5c5SAndroid Build Coastguard Worker ANGLE_REPLAY_EXPORT const char *GetSerializedContextState(uint32_t frameIndex); 66*8975f5c5SAndroid Build Coastguard Worker 67*8975f5c5SAndroid Build Coastguard Worker ANGLE_REPLAY_EXPORT void SetupEntryPoints(angle::TraceCallbacks *traceCallbacks, 68*8975f5c5SAndroid Build Coastguard Worker angle::TraceFunctions **traceFunctions); 69*8975f5c5SAndroid Build Coastguard Worker #endif // defined(__cplusplus) 70*8975f5c5SAndroid Build Coastguard Worker 71*8975f5c5SAndroid Build Coastguard Worker // Maps from <captured Program ID, captured location> to run-time location. 72*8975f5c5SAndroid Build Coastguard Worker extern GLint **gUniformLocations; 73*8975f5c5SAndroid Build Coastguard Worker extern GLuint gCurrentProgram; 74*8975f5c5SAndroid Build Coastguard Worker 75*8975f5c5SAndroid Build Coastguard Worker void UpdateUniformLocation(GLuint program, const char *name, GLint location, GLint count); 76*8975f5c5SAndroid Build Coastguard Worker void DeleteUniformLocations(GLuint program); 77*8975f5c5SAndroid Build Coastguard Worker void UpdateUniformBlockIndex(GLuint program, const char *name, GLuint index); 78*8975f5c5SAndroid Build Coastguard Worker void UniformBlockBinding(GLuint program, GLuint uniformblockIndex, GLuint binding); 79*8975f5c5SAndroid Build Coastguard Worker void UpdateCurrentProgram(GLuint program); 80*8975f5c5SAndroid Build Coastguard Worker 81*8975f5c5SAndroid Build Coastguard Worker // Global state 82*8975f5c5SAndroid Build Coastguard Worker 83*8975f5c5SAndroid Build Coastguard Worker extern uint8_t *gBinaryData; 84*8975f5c5SAndroid Build Coastguard Worker extern uint8_t *gReadBuffer; 85*8975f5c5SAndroid Build Coastguard Worker extern uint8_t *gClientArrays[]; 86*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gResourceIDBuffer; 87*8975f5c5SAndroid Build Coastguard Worker 88*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gBufferMap; 89*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gFenceNVMap; 90*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gFramebufferMap; 91*8975f5c5SAndroid Build Coastguard Worker extern GLuint **gFramebufferMapPerContext; 92*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gMemoryObjectMap; 93*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gProgramPipelineMap; 94*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gQueryMap; 95*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gRenderbufferMap; 96*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gSamplerMap; 97*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gSemaphoreMap; 98*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gShaderProgramMap; 99*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gTextureMap; 100*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gTransformFeedbackMap; 101*8975f5c5SAndroid Build Coastguard Worker extern GLuint *gVertexArrayMap; 102*8975f5c5SAndroid Build Coastguard Worker 103*8975f5c5SAndroid Build Coastguard Worker // TODO(jmadill): Consolidate. http://anglebug.com/42266223 104*8975f5c5SAndroid Build Coastguard Worker extern GLeglImageOES *gEGLImageMap2; 105*8975f5c5SAndroid Build Coastguard Worker extern EGLSurface *gSurfaceMap2; 106*8975f5c5SAndroid Build Coastguard Worker extern EGLContext *gContextMap2; 107*8975f5c5SAndroid Build Coastguard Worker extern GLsync *gSyncMap2; 108*8975f5c5SAndroid Build Coastguard Worker extern EGLSync *gEGLSyncMap; 109*8975f5c5SAndroid Build Coastguard Worker extern EGLDisplay gEGLDisplay; 110*8975f5c5SAndroid Build Coastguard Worker extern angle::ReplayResourceMode gReplayResourceMode; 111*8975f5c5SAndroid Build Coastguard Worker 112*8975f5c5SAndroid Build Coastguard Worker void InitializeReplay4(const char *binaryDataFileName, 113*8975f5c5SAndroid Build Coastguard Worker size_t maxClientArraySize, 114*8975f5c5SAndroid Build Coastguard Worker size_t readBufferSize, 115*8975f5c5SAndroid Build Coastguard Worker size_t resourceIDBufferSize, 116*8975f5c5SAndroid Build Coastguard Worker GLuint contextId, 117*8975f5c5SAndroid Build Coastguard Worker uint32_t maxBuffer, 118*8975f5c5SAndroid Build Coastguard Worker uint32_t maxContext, 119*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFenceNV, 120*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFramebuffer, 121*8975f5c5SAndroid Build Coastguard Worker uint32_t maxImage, 122*8975f5c5SAndroid Build Coastguard Worker uint32_t maxMemoryObject, 123*8975f5c5SAndroid Build Coastguard Worker uint32_t maxProgramPipeline, 124*8975f5c5SAndroid Build Coastguard Worker uint32_t maxQuery, 125*8975f5c5SAndroid Build Coastguard Worker uint32_t maxRenderbuffer, 126*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSampler, 127*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSemaphore, 128*8975f5c5SAndroid Build Coastguard Worker uint32_t maxShaderProgram, 129*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSurface, 130*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSync, 131*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTexture, 132*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTransformFeedback, 133*8975f5c5SAndroid Build Coastguard Worker uint32_t maxVertexArray, 134*8975f5c5SAndroid Build Coastguard Worker uint32_t maxEGLSyncID); 135*8975f5c5SAndroid Build Coastguard Worker 136*8975f5c5SAndroid Build Coastguard Worker void InitializeReplay3(const char *binaryDataFileName, 137*8975f5c5SAndroid Build Coastguard Worker size_t maxClientArraySize, 138*8975f5c5SAndroid Build Coastguard Worker size_t readBufferSize, 139*8975f5c5SAndroid Build Coastguard Worker size_t resourceIDBufferSize, 140*8975f5c5SAndroid Build Coastguard Worker GLuint contextId, 141*8975f5c5SAndroid Build Coastguard Worker uint32_t maxBuffer, 142*8975f5c5SAndroid Build Coastguard Worker uint32_t maxContext, 143*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFenceNV, 144*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFramebuffer, 145*8975f5c5SAndroid Build Coastguard Worker uint32_t maxImage, 146*8975f5c5SAndroid Build Coastguard Worker uint32_t maxMemoryObject, 147*8975f5c5SAndroid Build Coastguard Worker uint32_t maxProgramPipeline, 148*8975f5c5SAndroid Build Coastguard Worker uint32_t maxQuery, 149*8975f5c5SAndroid Build Coastguard Worker uint32_t maxRenderbuffer, 150*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSampler, 151*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSemaphore, 152*8975f5c5SAndroid Build Coastguard Worker uint32_t maxShaderProgram, 153*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSurface, 154*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSync, 155*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTexture, 156*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTransformFeedback, 157*8975f5c5SAndroid Build Coastguard Worker uint32_t maxVertexArray); 158*8975f5c5SAndroid Build Coastguard Worker 159*8975f5c5SAndroid Build Coastguard Worker void InitializeReplay2(const char *binaryDataFileName, 160*8975f5c5SAndroid Build Coastguard Worker size_t maxClientArraySize, 161*8975f5c5SAndroid Build Coastguard Worker size_t readBufferSize, 162*8975f5c5SAndroid Build Coastguard Worker GLuint contextId, 163*8975f5c5SAndroid Build Coastguard Worker uint32_t maxBuffer, 164*8975f5c5SAndroid Build Coastguard Worker uint32_t maxContext, 165*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFenceNV, 166*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFramebuffer, 167*8975f5c5SAndroid Build Coastguard Worker uint32_t maxImage, 168*8975f5c5SAndroid Build Coastguard Worker uint32_t maxMemoryObject, 169*8975f5c5SAndroid Build Coastguard Worker uint32_t maxProgramPipeline, 170*8975f5c5SAndroid Build Coastguard Worker uint32_t maxQuery, 171*8975f5c5SAndroid Build Coastguard Worker uint32_t maxRenderbuffer, 172*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSampler, 173*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSemaphore, 174*8975f5c5SAndroid Build Coastguard Worker uint32_t maxShaderProgram, 175*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSurface, 176*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTexture, 177*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTransformFeedback, 178*8975f5c5SAndroid Build Coastguard Worker uint32_t maxVertexArray); 179*8975f5c5SAndroid Build Coastguard Worker 180*8975f5c5SAndroid Build Coastguard Worker void InitializeReplay(const char *binaryDataFileName, 181*8975f5c5SAndroid Build Coastguard Worker size_t maxClientArraySize, 182*8975f5c5SAndroid Build Coastguard Worker size_t readBufferSize, 183*8975f5c5SAndroid Build Coastguard Worker uint32_t maxBuffer, 184*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFenceNV, 185*8975f5c5SAndroid Build Coastguard Worker uint32_t maxFramebuffer, 186*8975f5c5SAndroid Build Coastguard Worker uint32_t maxMemoryObject, 187*8975f5c5SAndroid Build Coastguard Worker uint32_t maxProgramPipeline, 188*8975f5c5SAndroid Build Coastguard Worker uint32_t maxQuery, 189*8975f5c5SAndroid Build Coastguard Worker uint32_t maxRenderbuffer, 190*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSampler, 191*8975f5c5SAndroid Build Coastguard Worker uint32_t maxSemaphore, 192*8975f5c5SAndroid Build Coastguard Worker uint32_t maxShaderProgram, 193*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTexture, 194*8975f5c5SAndroid Build Coastguard Worker uint32_t maxTransformFeedback, 195*8975f5c5SAndroid Build Coastguard Worker uint32_t maxVertexArray); 196*8975f5c5SAndroid Build Coastguard Worker 197*8975f5c5SAndroid Build Coastguard Worker void UpdateClientArrayPointer(int arrayIndex, const void *data, uint64_t size); 198*8975f5c5SAndroid Build Coastguard Worker void UpdateClientBufferData(GLuint bufferID, const void *source, GLsizei size); 199*8975f5c5SAndroid Build Coastguard Worker void UpdateClientBufferDataWithOffset(GLuint bufferID, 200*8975f5c5SAndroid Build Coastguard Worker const void *source, 201*8975f5c5SAndroid Build Coastguard Worker GLsizei size, 202*8975f5c5SAndroid Build Coastguard Worker GLsizei offset); 203*8975f5c5SAndroid Build Coastguard Worker void UpdateResourceIDBuffer(int resourceIndex, GLuint id); 204*8975f5c5SAndroid Build Coastguard Worker void UpdateBufferID(GLuint id, GLsizei readBufferOffset); 205*8975f5c5SAndroid Build Coastguard Worker void UpdateFenceNVID(GLuint id, GLsizei readBufferOffset); 206*8975f5c5SAndroid Build Coastguard Worker void UpdateFramebufferID(GLuint id, GLsizei readBufferOffset); 207*8975f5c5SAndroid Build Coastguard Worker void UpdateFramebufferID2(GLuint contextId, GLuint id, GLsizei readBufferOffset); 208*8975f5c5SAndroid Build Coastguard Worker void UpdateMemoryObjectID(GLuint id, GLsizei readBufferOffset); 209*8975f5c5SAndroid Build Coastguard Worker void UpdateProgramPipelineID(GLuint id, GLsizei readBufferOffset); 210*8975f5c5SAndroid Build Coastguard Worker void UpdateQueryID(GLuint id, GLsizei readBufferOffset); 211*8975f5c5SAndroid Build Coastguard Worker void UpdateRenderbufferID(GLuint id, GLsizei readBufferOffset); 212*8975f5c5SAndroid Build Coastguard Worker void UpdateSamplerID(GLuint id, GLsizei readBufferOffset); 213*8975f5c5SAndroid Build Coastguard Worker void UpdateSemaphoreID(GLuint id, GLsizei readBufferOffset); 214*8975f5c5SAndroid Build Coastguard Worker void UpdateShaderProgramID(GLuint id, GLsizei readBufferOffset); 215*8975f5c5SAndroid Build Coastguard Worker void UpdateTextureID(GLuint id, GLsizei readBufferOffset); 216*8975f5c5SAndroid Build Coastguard Worker void UpdateTransformFeedbackID(GLuint id, GLsizei readBufferOffset); 217*8975f5c5SAndroid Build Coastguard Worker void UpdateVertexArrayID(GLuint id, GLsizei readBufferOffset); 218*8975f5c5SAndroid Build Coastguard Worker 219*8975f5c5SAndroid Build Coastguard Worker void SetCurrentContextID(GLuint id); 220*8975f5c5SAndroid Build Coastguard Worker 221*8975f5c5SAndroid Build Coastguard Worker void SetFramebufferID(GLuint id); 222*8975f5c5SAndroid Build Coastguard Worker void SetFramebufferID2(GLuint contextID, GLuint id); 223*8975f5c5SAndroid Build Coastguard Worker void SetBufferID(GLuint id); 224*8975f5c5SAndroid Build Coastguard Worker void SetRenderbufferID(GLuint id); 225*8975f5c5SAndroid Build Coastguard Worker void SetTextureID(GLuint id); 226*8975f5c5SAndroid Build Coastguard Worker 227*8975f5c5SAndroid Build Coastguard Worker // These functions allow the traces to change variable assignments into function calls, 228*8975f5c5SAndroid Build Coastguard Worker // which makes it so the trace C interpreter doesn't need to implement operators at all. 229*8975f5c5SAndroid Build Coastguard Worker void MapBufferRange(GLenum target, 230*8975f5c5SAndroid Build Coastguard Worker GLintptr offset, 231*8975f5c5SAndroid Build Coastguard Worker GLsizeiptr length, 232*8975f5c5SAndroid Build Coastguard Worker GLbitfield access, 233*8975f5c5SAndroid Build Coastguard Worker GLuint buffer); 234*8975f5c5SAndroid Build Coastguard Worker void MapBufferRangeEXT(GLenum target, 235*8975f5c5SAndroid Build Coastguard Worker GLintptr offset, 236*8975f5c5SAndroid Build Coastguard Worker GLsizeiptr length, 237*8975f5c5SAndroid Build Coastguard Worker GLbitfield access, 238*8975f5c5SAndroid Build Coastguard Worker GLuint buffer); 239*8975f5c5SAndroid Build Coastguard Worker void MapBufferOES(GLenum target, GLbitfield access, GLuint buffer); 240*8975f5c5SAndroid Build Coastguard Worker void CreateShader(GLenum shaderType, GLuint shaderProgram); 241*8975f5c5SAndroid Build Coastguard Worker void CreateProgram(GLuint shaderProgram); 242*8975f5c5SAndroid Build Coastguard Worker void CreateShaderProgramv(GLenum type, 243*8975f5c5SAndroid Build Coastguard Worker GLsizei count, 244*8975f5c5SAndroid Build Coastguard Worker const GLchar *const *strings, 245*8975f5c5SAndroid Build Coastguard Worker GLuint shaderProgram); 246*8975f5c5SAndroid Build Coastguard Worker void FenceSync(GLenum condition, GLbitfield flags, uintptr_t fenceSync); 247*8975f5c5SAndroid Build Coastguard Worker void FenceSync2(GLenum condition, GLbitfield flags, uintptr_t fenceSync); 248*8975f5c5SAndroid Build Coastguard Worker void CreateEGLImage(EGLDisplay dpy, 249*8975f5c5SAndroid Build Coastguard Worker EGLContext ctx, 250*8975f5c5SAndroid Build Coastguard Worker EGLenum target, 251*8975f5c5SAndroid Build Coastguard Worker uintptr_t buffer, 252*8975f5c5SAndroid Build Coastguard Worker const EGLAttrib *attrib_list, 253*8975f5c5SAndroid Build Coastguard Worker GLsizei width, 254*8975f5c5SAndroid Build Coastguard Worker GLsizei height, 255*8975f5c5SAndroid Build Coastguard Worker GLuint imageID); 256*8975f5c5SAndroid Build Coastguard Worker void CreateEGLImageKHR(EGLDisplay dpy, 257*8975f5c5SAndroid Build Coastguard Worker EGLContext ctx, 258*8975f5c5SAndroid Build Coastguard Worker EGLenum target, 259*8975f5c5SAndroid Build Coastguard Worker uintptr_t buffer, 260*8975f5c5SAndroid Build Coastguard Worker const EGLint *attrib_list, 261*8975f5c5SAndroid Build Coastguard Worker GLsizei width, 262*8975f5c5SAndroid Build Coastguard Worker GLsizei height, 263*8975f5c5SAndroid Build Coastguard Worker GLuint imageID); 264*8975f5c5SAndroid Build Coastguard Worker void DestroyEGLImage(EGLDisplay dpy, EGLImage image, GLuint imageID); 265*8975f5c5SAndroid Build Coastguard Worker void DestroyEGLImageKHR(EGLDisplay dpy, EGLImageKHR image, GLuint imageID); 266*8975f5c5SAndroid Build Coastguard Worker void CreateEGLSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list, GLuint syncID); 267*8975f5c5SAndroid Build Coastguard Worker void CreateEGLSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list, GLuint syncID); 268*8975f5c5SAndroid Build Coastguard Worker void CreatePbufferSurface(EGLDisplay dpy, 269*8975f5c5SAndroid Build Coastguard Worker EGLConfig config, 270*8975f5c5SAndroid Build Coastguard Worker const EGLint *attrib_list, 271*8975f5c5SAndroid Build Coastguard Worker GLuint surfaceID); 272*8975f5c5SAndroid Build Coastguard Worker void CreateNativeClientBufferANDROID(const EGLint *attrib_list, uintptr_t clientBuffer); 273*8975f5c5SAndroid Build Coastguard Worker void CreateContext(GLuint contextID); 274*8975f5c5SAndroid Build Coastguard Worker 275*8975f5c5SAndroid Build Coastguard Worker void ValidateSerializedState(const char *serializedState, const char *fileName, uint32_t line); 276*8975f5c5SAndroid Build Coastguard Worker #define VALIDATE_CHECKPOINT(STATE) ValidateSerializedState(STATE, __FILE__, __LINE__) 277*8975f5c5SAndroid Build Coastguard Worker 278*8975f5c5SAndroid Build Coastguard Worker #if defined(__cplusplus) 279*8975f5c5SAndroid Build Coastguard Worker } // extern "C" 280*8975f5c5SAndroid Build Coastguard Worker #endif // defined(__cplusplus) 281*8975f5c5SAndroid Build Coastguard Worker 282*8975f5c5SAndroid Build Coastguard Worker #endif // ANGLE_TRACE_FIXTURE_H_ 283