Index: gpu/command_buffer/client/gles2_implementation.cc |
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc |
index 07b369097631c526e4a6a00f03920e5d18ff87d8..f200d2734ae39f7df7b82edde1cf9654274848dc 100644 |
--- a/gpu/command_buffer/client/gles2_implementation.cc |
+++ b/gpu/command_buffer/client/gles2_implementation.cc |
@@ -2363,7 +2363,7 @@ void GLES2Implementation::GetActiveUniformBlockName( |
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetActiveUniformBlockName(" |
<< program << ", " << index << ", " << bufsize << ", " |
<< static_cast<const void*>(length) << ", " |
- << static_cast<const void*>(name) << ", "); |
+ << static_cast<const void*>(name) << ")"); |
if (bufsize < 0) { |
SetGLError(GL_INVALID_VALUE, "glGetActiveUniformBlockName", "bufsize < 0"); |
return; |
@@ -2380,6 +2380,52 @@ void GLES2Implementation::GetActiveUniformBlockName( |
CheckGLError(); |
} |
+bool GLES2Implementation::GetActiveUniformBlockivHelper( |
+ GLuint program, GLuint index, GLenum pname, GLint* params) { |
+ typedef cmds::GetActiveUniformBlockiv::Result Result; |
+ Result* result = GetResultAs<Result*>(); |
+ if (!result) { |
+ return false; |
+ } |
+ result->SetNumResults(0); |
+ helper_->GetActiveUniformBlockiv( |
+ program, index, pname, GetResultShmId(), GetResultShmOffset()); |
+ WaitForCmd(); |
+ if (result->GetNumResults() > 0) { |
+ if (params) { |
+ result->CopyResult(params); |
+ } |
+ GPU_CLIENT_LOG_CODE_BLOCK({ |
+ for (int32_t i = 0; i < result->GetNumResults(); ++i) { |
+ GPU_CLIENT_LOG(" " << i << ": " << result->GetData()[i]); |
+ } |
+ }); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
+void GLES2Implementation::GetActiveUniformBlockiv( |
+ GLuint program, GLuint index, GLenum pname, GLint* params) { |
+ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetActiveUniformBlockiv(" |
+ << program << ", " << index << ", " |
+ << GLES2Util::GetStringProgramParameter(pname) << ", " |
+ << static_cast<const void*>(params) << ")"); |
+ TRACE_EVENT0("gpu", "GLES2::GetActiveUniformBlockiv"); |
+ bool success = |
+ share_group_->program_info_manager()->GetActiveUniformBlockiv( |
+ this, program, index, pname, params); |
+ if (success) { |
+ if (params) { |
+ // TODO(zmo): For GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES, there will |
+ // be more than one value returned in params. |
+ GPU_CLIENT_LOG(" params: " << params[0]); |
+ } |
+ } |
+ CheckGLError(); |
+} |
+ |
void GLES2Implementation::GetAttachedShaders( |
GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |