diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-11-06 13:42:48 -0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-11-06 14:39:08 -0800 |
commit | 300ad09822db1013d9f28c4bca3680f865533ab6 (patch) | |
tree | b8375a9ed175fc6625d85c9c586980292d3f0ab4 /opengl/libs/GLES_trace | |
parent | 7abbbc680d03dd8e50a709f89b78ace6b81154b0 (diff) | |
download | frameworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.zip frameworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.tar.gz frameworks_native-300ad09822db1013d9f28c4bca3680f865533ab6.tar.bz2 |
Fix return type of glGetAttribLocation and glGetUniformLocation
from int to GLint.
See:
http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetAttribLocation.xml
http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml
Change-Id: I4a9f8e9e34b8c3cca239ae84bfe8f3cdfd94802a
Diffstat (limited to 'opengl/libs/GLES_trace')
-rw-r--r-- | opengl/libs/GLES_trace/src/gltrace_api.cpp | 8 | ||||
-rw-r--r-- | opengl/libs/GLES_trace/src/gltrace_api.h | 4 | ||||
-rw-r--r-- | opengl/libs/GLES_trace/src/gltrace_fixup.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp index cef6cbb..2ae4b11 100644 --- a/opengl/libs/GLES_trace/src/gltrace_api.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp @@ -2214,7 +2214,7 @@ void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* cou glContext->traceGLMessage(&glmsg); } -int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) { +GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -2235,7 +2235,7 @@ int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) { // call function nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); - int retValue = glContext->hooks->gl.glGetAttribLocation(program, name); + GLint retValue = glContext->hooks->gl.glGetAttribLocation(program, name); nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); @@ -2996,7 +2996,7 @@ void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) { glContext->traceGLMessage(&glmsg); } -int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) { +GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -3017,7 +3017,7 @@ int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) { // call function nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); - int retValue = glContext->hooks->gl.glGetUniformLocation(program, name); + GLint retValue = glContext->hooks->gl.glGetUniformLocation(program, name); nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h index debcac0..309afcb 100644 --- a/opengl/libs/GLES_trace/src/gltrace_api.h +++ b/opengl/libs/GLES_trace/src/gltrace_api.h @@ -78,7 +78,7 @@ void GLTrace_glGenTextures(GLsizei n, GLuint* textures); void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name); +GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar* name); void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params); void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); GLenum GLTrace_glGetError(void); @@ -97,7 +97,7 @@ void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params); void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params); -int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name); +GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar* name); void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params); void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params); void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer); diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp index 3597b26..3932654 100644 --- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp @@ -340,7 +340,7 @@ void fixup_glLinkProgram(GLMessage *glmsg) { /** Given a glGetActive[Uniform|Attrib] call, obtain the location * of the variable of given name in the call. */ -int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg, GLchar *name) { +GLint getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg, GLchar *name) { GLMessage_Function func = glmsg->function(); if (func != GLMessage::glGetActiveAttrib && func != GLMessage::glGetActiveUniform) { return -1; @@ -373,7 +373,7 @@ void fixup_glGetActiveAttribOrUniform(GLTraceContext *context, GLMessage *glmsg, // In order to make things simpler for the debugger, we also pass // a hidden location argument that stores the actual location. // append the location value to the end of the argument list - int location = getShaderVariableLocation(context, glmsg, (GLchar*)pointersToFixup[3]); + GLint location = getShaderVariableLocation(context, glmsg, (GLchar*)pointersToFixup[3]); GLMessage_DataType *arg_location = glmsg->add_args(); arg_location->set_isarray(false); arg_location->set_type(GLMessage::DataType::INT); |