mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1367613 - Track and spew synchronous/blocking GL call counts. r=jgilbert
This commit is contained in:
parent
1dc60d3f88
commit
cf725b7488
@ -931,6 +931,8 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
mResetLayer = true;
|
||||
mBackbufferNeedsClear = true;
|
||||
|
||||
gl->ResetSyncCallCount("Existing WebGLContext resized.");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1145,6 +1147,8 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
reporter.SetSuccessful();
|
||||
|
||||
failureId = NS_LITERAL_CSTRING("SUCCESS");
|
||||
|
||||
gl->ResetSyncCallCount("WebGLContext Initialization");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1597,6 +1601,7 @@ WebGLContext::OnEndOfFrame() const
|
||||
mDataAllocGLCallCount);
|
||||
}
|
||||
mDataAllocGLCallCount = 0;
|
||||
gl->ResetSyncCallCount("WebGLContext PresentScreenBuffer");
|
||||
}
|
||||
|
||||
// For an overview of how WebGL compositing works, see:
|
||||
|
@ -290,6 +290,7 @@ GLContext::GLContext(CreateContextFlags flags, const SurfaceCaps& caps,
|
||||
mTextureAllocCrashesOnMapFailure(false),
|
||||
mNeedsCheckAfterAttachTextureToFb(false),
|
||||
mWorkAroundDriverBugs(true),
|
||||
mSyncGLCallCount(0),
|
||||
mHeavyGLCallsSinceLastFlush(false)
|
||||
{
|
||||
mMaxViewportDims[0] = 0;
|
||||
@ -3046,6 +3047,16 @@ bool GLContext::MakeCurrent(bool aForce)
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::ResetSyncCallCount(const char* resetReason) const
|
||||
{
|
||||
if (ShouldSpew()) {
|
||||
printf_stderr("On %s, mSyncGLCallCount = %" PRIu64 "\n",
|
||||
resetReason, mSyncGLCallCount);
|
||||
}
|
||||
|
||||
mSyncGLCallCount = 0;
|
||||
}
|
||||
|
||||
} /* namespace gl */
|
||||
} /* namespace mozilla */
|
||||
|
@ -788,6 +788,16 @@ private:
|
||||
// if it's bound.
|
||||
void AfterGLReadCall() { }
|
||||
|
||||
public:
|
||||
void OnSyncCall() const {
|
||||
mSyncGLCallCount++;
|
||||
}
|
||||
|
||||
uint64_t GetSyncCallCount() const {
|
||||
return mSyncGLCallCount;
|
||||
}
|
||||
|
||||
void ResetSyncCallCount(const char* resetReason) const;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// GL official entry points
|
||||
@ -885,6 +895,7 @@ private:
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(data);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fBufferData(target, size, data, usage);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
mHeavyGLCallsSinceLastFlush = true;
|
||||
}
|
||||
@ -1131,6 +1142,7 @@ public:
|
||||
void fFinish() {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fFinish();
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
mHeavyGLCallsSinceLastFlush = false;
|
||||
}
|
||||
@ -1151,24 +1163,28 @@ public:
|
||||
void fGetActiveAttrib(GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetActiveAttrib(program, index, maxLength, length, size, type, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetActiveUniform(GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetActiveUniform(program, index, maxLength, length, size, type, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetAttachedShaders(program, maxCount, count, shaders);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
GLint fGetAttribLocation(GLuint program, const GLchar* name) {
|
||||
BEFORE_GL_CALL;
|
||||
GLint retval = mSymbols.fGetAttribLocation(program, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -1177,6 +1193,7 @@ private:
|
||||
void raw_fGetIntegerv(GLenum pname, GLint* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetIntegerv(pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1199,18 +1216,21 @@ public:
|
||||
void fGetFloatv(GLenum pname, GLfloat* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetFloatv(pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetBooleanv(GLenum pname, realGLboolean* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetBooleanv(pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetBufferParameteriv(target, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1218,6 +1238,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetDebugMessageLog);
|
||||
GLuint ret = mSymbols.fGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -1226,6 +1247,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetPointerv);
|
||||
mSymbols.fGetPointerv(pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1233,6 +1255,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetObjectLabel);
|
||||
mSymbols.fGetObjectLabel(identifier, name, bufSize, length, label);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1240,6 +1263,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetObjectPtrLabel);
|
||||
mSymbols.fGetObjectPtrLabel(ptr, bufSize, length, label);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1252,12 +1276,14 @@ public:
|
||||
void fGetProgramiv(GLuint program, GLenum pname, GLint* param) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetProgramiv(program, pname, param);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetProgramInfoLog(program, bufSize, length, infoLog);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1282,6 +1308,7 @@ public:
|
||||
const GLubyte* fGetString(GLenum name) {
|
||||
BEFORE_GL_CALL;
|
||||
const GLubyte* result = mSymbols.fGetString(name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
@ -1290,6 +1317,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetTexImage);
|
||||
mSymbols.fGetTexImage(target, level, format, type, img);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1298,30 +1326,35 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetTexLevelParameteriv);
|
||||
mSymbols.fGetTexLevelParameteriv(target, level, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetTexParameterfv(target, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetTexParameteriv(target, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetUniformfv(GLuint program, GLint location, GLfloat* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetUniformfv(program, location, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetUniformiv(GLuint program, GLint location, GLint* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetUniformiv(program, location, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1329,12 +1362,14 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetUniformuiv);
|
||||
mSymbols.fGetUniformuiv(program, location, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
GLint fGetUniformLocation (GLint programObj, const GLchar* name) {
|
||||
BEFORE_GL_CALL;
|
||||
GLint retval = mSymbols.fGetUniformLocation(programObj, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -1342,18 +1377,21 @@ public:
|
||||
void fGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* retval) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetVertexAttribfv(index, pname, retval);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetVertexAttribiv(GLuint index, GLenum pname, GLint* retval) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetVertexAttribiv(index, pname, retval);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** retval) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetVertexAttribPointerv(index, pname, retval);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1366,6 +1404,7 @@ public:
|
||||
realGLboolean fIsBuffer(GLuint buffer) {
|
||||
BEFORE_GL_CALL;
|
||||
realGLboolean retval = mSymbols.fIsBuffer(buffer);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -1497,6 +1536,7 @@ public:
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pixels);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
mHeavyGLCallsSinceLastFlush = true;
|
||||
}
|
||||
@ -1860,12 +1900,14 @@ public:
|
||||
void fGetShaderiv(GLuint shader, GLenum pname, GLint* param) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetShaderiv(shader, pname, param);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetShaderInfoLog(shader, bufSize, length, infoLog);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1876,6 +1918,7 @@ private:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetShaderPrecisionFormat);
|
||||
mSymbols.fGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1892,6 +1935,7 @@ public:
|
||||
void fGetShaderSource(GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetShaderSource(obj, maxLength, length, source);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -1920,6 +1964,7 @@ public:
|
||||
GLenum fCheckFramebufferStatus(GLenum target) {
|
||||
BEFORE_GL_CALL;
|
||||
GLenum retval = mSymbols.fCheckFramebufferStatus(target);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -1949,18 +1994,21 @@ public:
|
||||
void fGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* value) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetFramebufferAttachmentParameteriv(target, attachment, pname, value);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* value) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetRenderbufferParameteriv(target, pname, value);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
realGLboolean fIsFramebuffer (GLuint framebuffer) {
|
||||
BEFORE_GL_CALL;
|
||||
realGLboolean retval = mSymbols.fIsFramebuffer(framebuffer);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -1969,6 +2017,7 @@ public:
|
||||
realGLboolean fIsRenderbuffer (GLuint renderbuffer) {
|
||||
BEFORE_GL_CALL;
|
||||
realGLboolean retval = mSymbols.fIsRenderbuffer(renderbuffer);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -2037,6 +2086,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fMapBuffer);
|
||||
void* ret = mSymbols.fMapBuffer(target, access);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2068,24 +2118,28 @@ private:
|
||||
void raw_fGenBuffers(GLsizei n, GLuint* names) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGenBuffers(n, names);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void raw_fGenFramebuffers(GLsizei n, GLuint* names) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGenFramebuffers(n, names);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void raw_fGenRenderbuffers(GLsizei n, GLuint* names) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGenRenderbuffers(n, names);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void raw_fGenTextures(GLsizei n, GLuint* names) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGenTextures(n, names);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2192,6 +2246,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetGraphicsResetStatus);
|
||||
GLenum ret = mSymbols.fGetGraphicsResetStatus();
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2204,6 +2259,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fFenceSync);
|
||||
GLsync ret = mSymbols.fFenceSync(condition, flags);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2212,6 +2268,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fIsSync);
|
||||
realGLboolean ret = mSymbols.fIsSync(sync);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2227,6 +2284,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fClientWaitSync);
|
||||
GLenum ret = mSymbols.fClientWaitSync(sync, flags, timeout);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2249,6 +2307,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetSynciv);
|
||||
mSymbols.fGetSynciv(sync, pname, bufSize, length, values);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2391,6 +2450,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetVertexAttribIiv);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetVertexAttribIiv(index, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2399,6 +2459,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetVertexAttribIuiv);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetVertexAttribIuiv(index, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2503,6 +2564,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetFragDataLocation);
|
||||
GLint result = mSymbols.fGetFragDataLocation(program, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
@ -2526,6 +2588,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetInternalformativ);
|
||||
mSymbols.fGetInternalformativ(target, internalformat, pname, bufSize, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2582,6 +2645,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetQueryiv);
|
||||
mSymbols.fGetQueryiv(target, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2589,6 +2653,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetQueryObjectuiv);
|
||||
mSymbols.fGetQueryObjectuiv(id, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2596,6 +2661,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fIsQuery);
|
||||
realGLboolean retval = mSymbols.fIsQuery(query);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return retval;
|
||||
}
|
||||
@ -2612,6 +2678,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetQueryObjecti64v);
|
||||
mSymbols.fGetQueryObjecti64v(id, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2619,6 +2686,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetQueryObjectui64v);
|
||||
mSymbols.fGetQueryObjectui64v(id, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2639,6 +2707,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetQueryObjectiv);
|
||||
mSymbols.fGetQueryObjectiv(id, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2667,6 +2736,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGenTransformFeedbacks);
|
||||
mSymbols.fGenTransformFeedbacks(n, ids);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2683,6 +2753,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fIsTransformFeedback);
|
||||
realGLboolean result = mSymbols.fIsTransformFeedback(id);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
@ -2724,6 +2795,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetTransformFeedbackVarying);
|
||||
mSymbols.fGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2748,6 +2820,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetIntegeri_v);
|
||||
mSymbols.fGetIntegeri_v(param, index, values);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2755,6 +2828,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetInteger64i_v);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetInteger64i_v(target, index, data);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2790,6 +2864,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fIsVertexArray);
|
||||
realGLboolean ret = mSymbols.fIsVertexArray(array);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2826,6 +2901,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fTestFence);
|
||||
BEFORE_GL_CALL;
|
||||
realGLboolean ret = mSymbols.fTestFence(fence);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2835,6 +2911,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fFinishFence);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fFinishFence(fence);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2843,6 +2920,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fIsFence);
|
||||
BEFORE_GL_CALL;
|
||||
realGLboolean ret = mSymbols.fIsFence(fence);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2852,6 +2930,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetFenceiv);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetFenceiv(fence, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -2888,6 +2967,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fMapBufferRange);
|
||||
BEFORE_GL_CALL;
|
||||
void* data = mSymbols.fMapBufferRange(target, offset, length, access);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return data;
|
||||
}
|
||||
@ -2924,6 +3004,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fIsSampler);
|
||||
realGLboolean result = mSymbols.fIsSampler(sampler);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
@ -2994,6 +3075,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetUniformIndices);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3003,6 +3085,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetActiveUniformsiv);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3010,6 +3093,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetUniformBlockIndex);
|
||||
BEFORE_GL_CALL;
|
||||
GLuint result = mSymbols.fGetUniformBlockIndex(program, uniformBlockName);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
@ -3020,6 +3104,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetActiveUniformBlockiv);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3029,6 +3114,7 @@ public:
|
||||
ASSERT_SYMBOL_PRESENT(fGetActiveUniformBlockName);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3046,6 +3132,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fTexStorage2D);
|
||||
mSymbols.fTexStorage2D(target, levels, internalformat, width, height);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3054,6 +3141,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fTexStorage3D);
|
||||
mSymbols.fTexStorage3D(target, levels, internalformat, width, height, depth);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3071,6 +3159,7 @@ public:
|
||||
width, height, depth,
|
||||
border, format, type,
|
||||
data);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3083,6 +3172,7 @@ public:
|
||||
mSymbols.fTexSubImage3D(target, level, xoffset, yoffset, zoffset,
|
||||
width, height, depth, format, type,
|
||||
pixels);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
@ -3132,6 +3222,7 @@ public:
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetStringi);
|
||||
const GLubyte* ret = mSymbols.fGetStringi(name, index);
|
||||
OnSyncCall();
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -3475,6 +3566,7 @@ protected:
|
||||
bool mTextureAllocCrashesOnMapFailure;
|
||||
bool mNeedsCheckAfterAttachTextureToFb;
|
||||
bool mWorkAroundDriverBugs;
|
||||
mutable uint64_t mSyncGLCallCount;
|
||||
|
||||
bool IsTextureSizeSafeToPassToDriver(GLenum target, GLsizei width, GLsizei height) const {
|
||||
if (mNeedsTextureSizeChecks) {
|
||||
|
Loading…
Reference in New Issue
Block a user