Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: ui/gl/gl_bindings_autogen_gl.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_bindings_autogen_gl.h ('k') | ui/gl/gl_bindings_autogen_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_bindings_autogen_gl.cc
diff --git a/ui/gl/gl_bindings_autogen_gl.cc b/ui/gl/gl_bindings_autogen_gl.cc
index f1100e8986f665755fdb0f0544820b9846300a7c..a65571792c964590d857c31a8ce513035b300b50 100644
--- a/ui/gl/gl_bindings_autogen_gl.cc
+++ b/ui/gl/gl_bindings_autogen_gl.cc
@@ -212,6 +212,7 @@ void DriverGL::InitializeStaticBindings() {
GetGLProcAddress("glGetProgramInfoLog"));
fn.glGetProgramivFn =
reinterpret_cast<glGetProgramivProc>(GetGLProcAddress("glGetProgramiv"));
+ fn.glGetProgramResourceLocationFn = 0;
fn.glGetQueryivFn = 0;
fn.glGetQueryivARBFn = 0;
fn.glGetQueryObjecti64vFn = 0;
@@ -232,6 +233,7 @@ void DriverGL::InitializeStaticBindings() {
GetGLProcAddress("glGetShaderSource"));
fn.glGetStringFn =
reinterpret_cast<glGetStringProc>(GetGLProcAddress("glGetString"));
+ fn.glGetStringiFn = 0;
fn.glGetSyncivFn = 0;
fn.glGetTexLevelParameterfvFn = 0;
fn.glGetTexLevelParameterivFn = 0;
@@ -1272,6 +1274,14 @@ void DriverGL::InitializeDynamicBindings(GLContext* context) {
DCHECK(fn.glGetProgramBinaryFn);
}
+ debug_fn.glGetProgramResourceLocationFn = 0;
+ if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
+ fn.glGetProgramResourceLocationFn =
+ reinterpret_cast<glGetProgramResourceLocationProc>(
+ GetGLProcAddress("glGetProgramResourceLocation"));
+ DCHECK(fn.glGetProgramResourceLocationFn);
+ }
+
debug_fn.glGetQueryivFn = 0;
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetQueryivFn =
@@ -1387,6 +1397,13 @@ void DriverGL::InitializeDynamicBindings(GLContext* context) {
DCHECK(fn.glGetShaderPrecisionFormatFn);
}
+ debug_fn.glGetStringiFn = 0;
+ if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
+ fn.glGetStringiFn =
+ reinterpret_cast<glGetStringiProc>(GetGLProcAddress("glGetStringi"));
+ DCHECK(fn.glGetStringiFn);
+ }
+
debug_fn.glGetSyncivFn = 0;
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
@@ -3246,6 +3263,20 @@ Debug_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
g_driver_gl.debug_fn.glGetProgramivFn(program, pname, params);
}
+static GLint GL_BINDING_CALL
+Debug_glGetProgramResourceLocation(GLuint program,
+ GLenum programInterface,
+ const char* name) {
+ GL_SERVICE_LOG("glGetProgramResourceLocation"
+ << "(" << program << ", "
+ << GLEnums::GetStringEnum(programInterface) << ", " << name
+ << ")");
+ GLint result = g_driver_gl.debug_fn.glGetProgramResourceLocationFn(
+ program, programInterface, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
static void GL_BINDING_CALL
Debug_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
GL_SERVICE_LOG("glGetQueryiv"
@@ -3391,6 +3422,16 @@ static const GLubyte* GL_BINDING_CALL Debug_glGetString(GLenum name) {
return result;
}
+static const GLubyte* GL_BINDING_CALL
+Debug_glGetStringi(GLenum name, GLuint index) {
+ GL_SERVICE_LOG("glGetStringi"
+ << "(" << GLEnums::GetStringEnum(name) << ", " << index
+ << ")");
+ const GLubyte* result = g_driver_gl.debug_fn.glGetStringiFn(name, index);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
static void GL_BINDING_CALL Debug_glGetSynciv(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -5243,6 +5284,10 @@ void DriverGL::InitializeDebugBindings() {
debug_fn.glGetProgramivFn = fn.glGetProgramivFn;
fn.glGetProgramivFn = Debug_glGetProgramiv;
}
+ if (!debug_fn.glGetProgramResourceLocationFn) {
+ debug_fn.glGetProgramResourceLocationFn = fn.glGetProgramResourceLocationFn;
+ fn.glGetProgramResourceLocationFn = Debug_glGetProgramResourceLocation;
+ }
if (!debug_fn.glGetQueryivFn) {
debug_fn.glGetQueryivFn = fn.glGetQueryivFn;
fn.glGetQueryivFn = Debug_glGetQueryiv;
@@ -5309,6 +5354,10 @@ void DriverGL::InitializeDebugBindings() {
debug_fn.glGetStringFn = fn.glGetStringFn;
fn.glGetStringFn = Debug_glGetString;
}
+ if (!debug_fn.glGetStringiFn) {
+ debug_fn.glGetStringiFn = fn.glGetStringiFn;
+ fn.glGetStringiFn = Debug_glGetStringi;
+ }
if (!debug_fn.glGetSyncivFn) {
debug_fn.glGetSyncivFn = fn.glGetSyncivFn;
fn.glGetSyncivFn = Debug_glGetSynciv;
@@ -6652,6 +6701,13 @@ void GLApiBase::glGetProgramivFn(GLuint program, GLenum pname, GLint* params) {
driver_->fn.glGetProgramivFn(program, pname, params);
}
+GLint GLApiBase::glGetProgramResourceLocationFn(GLuint program,
+ GLenum programInterface,
+ const char* name) {
+ return driver_->fn.glGetProgramResourceLocationFn(program, programInterface,
+ name);
+}
+
void GLApiBase::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) {
driver_->fn.glGetQueryivFn(target, pname, params);
}
@@ -6740,6 +6796,10 @@ const GLubyte* GLApiBase::glGetStringFn(GLenum name) {
return driver_->fn.glGetStringFn(name);
}
+const GLubyte* GLApiBase::glGetStringiFn(GLenum name, GLuint index) {
+ return driver_->fn.glGetStringiFn(name, index);
+}
+
void GLApiBase::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -8452,6 +8512,15 @@ void TraceGLApi::glGetProgramivFn(GLuint program, GLenum pname, GLint* params) {
gl_api_->glGetProgramivFn(program, pname, params);
}
+GLint TraceGLApi::glGetProgramResourceLocationFn(GLuint program,
+ GLenum programInterface,
+ const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetProgramResourceLocation")
+ return gl_api_->glGetProgramResourceLocationFn(program, programInterface,
+ name);
+}
+
void TraceGLApi::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryiv")
gl_api_->glGetQueryivFn(target, pname, params);
@@ -8559,6 +8628,11 @@ const GLubyte* TraceGLApi::glGetStringFn(GLenum name) {
return gl_api_->glGetStringFn(name);
}
+const GLubyte* TraceGLApi::glGetStringiFn(GLenum name, GLuint index) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetStringi")
+ return gl_api_->glGetStringiFn(name, index);
+}
+
void TraceGLApi::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,
@@ -10539,6 +10613,16 @@ void NoContextGLApi::glGetProgramivFn(GLuint program,
LOG(ERROR) << "Trying to call glGetProgramiv() without current GL context";
}
+GLint NoContextGLApi::glGetProgramResourceLocationFn(GLuint program,
+ GLenum programInterface,
+ const char* name) {
+ NOTREACHED() << "Trying to call glGetProgramResourceLocation() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetProgramResourceLocation() without current "
+ "GL context";
+ return 0;
+}
+
void NoContextGLApi::glGetQueryivFn(GLenum target,
GLenum pname,
GLint* params) {
@@ -10676,6 +10760,12 @@ const GLubyte* NoContextGLApi::glGetStringFn(GLenum name) {
return NULL;
}
+const GLubyte* NoContextGLApi::glGetStringiFn(GLenum name, GLuint index) {
+ NOTREACHED() << "Trying to call glGetStringi() without current GL context";
+ LOG(ERROR) << "Trying to call glGetStringi() without current GL context";
+ return NULL;
+}
+
void NoContextGLApi::glGetSyncivFn(GLsync sync,
GLenum pname,
GLsizei bufSize,
« no previous file with comments | « ui/gl/gl_bindings_autogen_gl.h ('k') | ui/gl/gl_bindings_autogen_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698