#include "trace_fixture.h"
#include "angle_trace_gl.h"
#include <string>
namespace
{
void UpdateResourceMap(GLuint *resourceMap, GLuint id, GLsizei readBufferOffset)
{ … }
angle::TraceCallbacks *gTraceCallbacks = …;
EGLClientBuffer GetClientBuffer(EGLenum target, uintptr_t key)
{ … }
ValidateSerializedStateCallback gValidateSerializedStateCallback;
std::unordered_map<GLuint, std::vector<GLint>> gInternalUniformLocationsMap;
constexpr size_t kMaxClientArrays = …;
}
GLint **gUniformLocations;
GLuint gCurrentProgram = …;
BlockIndexesMap gUniformBlockIndexes;
void UpdateUniformLocation(GLuint program, const char *name, GLint location, GLint count)
{ … }
void DeleteUniformLocations(GLuint program)
{ … }
void UpdateUniformBlockIndex(GLuint program, const char *name, GLuint index)
{ … }
void UniformBlockBinding(GLuint program, GLuint uniformblockIndex, GLuint binding)
{ … }
void UpdateCurrentProgram(GLuint program)
{ … }
uint8_t *gBinaryData;
uint8_t *gReadBuffer;
uint8_t *gClientArrays[kMaxClientArrays];
GLuint *gResourceIDBuffer;
SyncResourceMap gSyncMap;
ContextMap gContextMap;
GLuint gShareContextId;
GLuint *gBufferMap;
GLuint *gFenceNVMap;
GLuint *gFramebufferMap;
GLuint *gMemoryObjectMap;
GLuint *gProgramPipelineMap;
GLuint *gQueryMap;
GLuint *gRenderbufferMap;
GLuint *gSamplerMap;
GLuint *gSemaphoreMap;
GLuint *gShaderProgramMap;
GLuint *gTextureMap;
GLuint *gTransformFeedbackMap;
GLuint *gVertexArrayMap;
ClientBufferMap gClientBufferMap;
EGLImageMap gEGLImageMap;
SurfaceMap gSurfaceMap;
GLeglImageOES *gEGLImageMap2;
GLuint *gEGLImageMap2Resources;
EGLSurface *gSurfaceMap2;
EGLContext *gContextMap2;
GLsync *gSyncMap2;
EGLSync *gEGLSyncMap;
EGLDisplay gEGLDisplay;
std::string gBinaryDataDir = …;
angle::ReplayResourceMode gReplayResourceMode = …;
template <typename T>
T *AllocateZeroedValues(size_t count)
{ … }
GLuint *AllocateZeroedUints(size_t count)
{ … }
void InitializeReplay4(const char *binaryDataFileName,
size_t maxClientArraySize,
size_t readBufferSize,
size_t resourceIDBufferSize,
GLuint contextId,
uint32_t maxBuffer,
uint32_t maxContext,
uint32_t maxFenceNV,
uint32_t maxFramebuffer,
uint32_t maxImage,
uint32_t maxMemoryObject,
uint32_t maxProgramPipeline,
uint32_t maxQuery,
uint32_t maxRenderbuffer,
uint32_t maxSampler,
uint32_t maxSemaphore,
uint32_t maxShaderProgram,
uint32_t maxSurface,
uint32_t maxSync,
uint32_t maxTexture,
uint32_t maxTransformFeedback,
uint32_t maxVertexArray,
GLuint maxEGLSyncID)
{ … }
void InitializeReplay3(const char *binaryDataFileName,
size_t maxClientArraySize,
size_t readBufferSize,
size_t resourceIDBufferSize,
GLuint contextId,
uint32_t maxBuffer,
uint32_t maxContext,
uint32_t maxFenceNV,
uint32_t maxFramebuffer,
uint32_t maxImage,
uint32_t maxMemoryObject,
uint32_t maxProgramPipeline,
uint32_t maxQuery,
uint32_t maxRenderbuffer,
uint32_t maxSampler,
uint32_t maxSemaphore,
uint32_t maxShaderProgram,
uint32_t maxSurface,
uint32_t maxSync,
uint32_t maxTexture,
uint32_t maxTransformFeedback,
uint32_t maxVertexArray)
{ … }
void InitializeReplay2(const char *binaryDataFileName,
size_t maxClientArraySize,
size_t readBufferSize,
GLuint contextId,
uint32_t maxBuffer,
uint32_t maxContext,
uint32_t maxFenceNV,
uint32_t maxFramebuffer,
uint32_t maxImage,
uint32_t maxMemoryObject,
uint32_t maxProgramPipeline,
uint32_t maxQuery,
uint32_t maxRenderbuffer,
uint32_t maxSampler,
uint32_t maxSemaphore,
uint32_t maxShaderProgram,
uint32_t maxSurface,
uint32_t maxTexture,
uint32_t maxTransformFeedback,
uint32_t maxVertexArray)
{ … }
void InitializeReplay(const char *binaryDataFileName,
size_t maxClientArraySize,
size_t readBufferSize,
uint32_t maxBuffer,
uint32_t maxFenceNV,
uint32_t maxFramebuffer,
uint32_t maxMemoryObject,
uint32_t maxProgramPipeline,
uint32_t maxQuery,
uint32_t maxRenderbuffer,
uint32_t maxSampler,
uint32_t maxSemaphore,
uint32_t maxShaderProgram,
uint32_t maxTexture,
uint32_t maxTransformFeedback,
uint32_t maxVertexArray)
{ … }
void FinishReplay()
{ … }
void SetValidateSerializedStateCallback(ValidateSerializedStateCallback callback)
{ … }
angle::TraceInfo gTraceInfo;
std::string gTraceGzPath;
struct TraceFunctionsImpl : angle::TraceFunctions
{ … };
TraceFunctionsImpl gTraceFunctionsImpl;
void SetupEntryPoints(angle::TraceCallbacks *traceCallbacks, angle::TraceFunctions **traceFunctions)
{ … }
void UpdateClientArrayPointer(int arrayIndex, const void *data, uint64_t size)
{ … }
BufferHandleMap gMappedBufferData;
void UpdateClientBufferData(GLuint bufferID, const void *source, GLsizei size)
{ … }
void UpdateClientBufferDataWithOffset(GLuint bufferID,
const void *source,
GLsizei size,
GLsizei offset)
{ … }
void UpdateResourceIDBuffer(int resourceIndex, GLuint id)
{ … }
void UpdateBufferID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateFenceNVID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateFramebufferID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateMemoryObjectID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateProgramPipelineID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateQueryID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateRenderbufferID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateSamplerID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateSemaphoreID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateShaderProgramID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateTextureID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateTransformFeedbackID(GLuint id, GLsizei readBufferOffset)
{ … }
void UpdateVertexArrayID(GLuint id, GLsizei readBufferOffset)
{ … }
void SetFramebufferID(GLuint id)
{ … }
void SetBufferID(GLuint id)
{ … }
void SetRenderbufferID(GLuint id)
{ … }
void SetTextureID(GLuint id)
{ … }
void ValidateSerializedState(const char *serializedState, const char *fileName, uint32_t line)
{ … }
void MapBufferRange(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access,
GLuint buffer)
{ … }
void MapBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access,
GLuint buffer)
{ … }
void MapBufferOES(GLenum target, GLbitfield access, GLuint buffer)
{ … }
void CreateShader(GLenum shaderType, GLuint shaderProgram)
{ … }
void CreateProgram(GLuint shaderProgram)
{ … }
void CreateShaderProgramv(GLenum type,
GLsizei count,
const GLchar *const *strings,
GLuint shaderProgram)
{ … }
void FenceSync(GLenum condition, GLbitfield flags, uintptr_t fenceSync)
{ … }
void FenceSync2(GLenum condition, GLbitfield flags, uintptr_t fenceSync)
{ … }
GLuint CreateEGLImageResource(GLsizei width, GLsizei height)
{ … }
void CreateEGLImage(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
uintptr_t buffer,
const EGLAttrib *attrib_list,
GLsizei width,
GLsizei height,
GLuint imageID)
{ … }
void CreateEGLImageKHR(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
uintptr_t buffer,
const EGLint *attrib_list,
GLsizei width,
GLsizei height,
GLuint imageID)
{ … }
void DestroyEGLImage(EGLDisplay dpy, EGLImage image, GLuint imageID)
{ … }
void DestroyEGLImageKHR(EGLDisplay dpy, EGLImageKHR image, GLuint imageID)
{ … }
void CreateEGLSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list, GLuint syncID)
{ … }
void CreateEGLSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list, GLuint syncID)
{ … }
void CreatePbufferSurface(EGLDisplay dpy,
EGLConfig config,
const EGLint *attrib_list,
GLuint surfaceID)
{ … }
void CreateNativeClientBufferANDROID(const EGLint *attrib_list, uintptr_t clientBuffer)
{ … }
void CreateContext(GLuint contextID)
{ … }
void SetCurrentContextID(GLuint id)
{ … }
ANGLE_REPLAY_EXPORT PFNEGLCREATEIMAGEPROC r_eglCreateImage;
ANGLE_REPLAY_EXPORT PFNEGLCREATEIMAGEKHRPROC r_eglCreateImageKHR;
ANGLE_REPLAY_EXPORT PFNEGLDESTROYIMAGEPROC r_eglDestroyImage;
ANGLE_REPLAY_EXPORT PFNEGLDESTROYIMAGEKHRPROC r_eglDestroyImageKHR;