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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 906613005: Add glUniformBlockBinding to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uniform
Patch Set: 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 886d6e4c2d171637ba4b546b135c5de3e43bd1a9..706b0a7f24b8f49b4cf303a83593032ed7f19c22 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -9740,7 +9740,7 @@ error::Error GLES2DecoderImpl::HandleGetActiveUniformBlockiv(
GLuint index = static_cast<GLuint>(c.index);
GLenum pname = static_cast<GLenum>(c.pname);
Program* program = GetProgramInfoNotShader(
- program_id, "glGetActiveUniform");
+ program_id, "glGetActiveUniformBlockiv");
if (!program) {
return error::kNoError;
}
@@ -11829,6 +11829,25 @@ error::Error GLES2DecoderImpl::HandleWaitAllAsyncTexImage2DCHROMIUM(
return error::kNoError;
}
+error::Error GLES2DecoderImpl::HandleUniformBlockBinding(
+ uint32_t immediate_data_size, const void* cmd_data) {
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::UniformBlockBinding& c =
+ *static_cast<const gles2::cmds::UniformBlockBinding*>(cmd_data);
+ GLuint client_id = c.program;
+ GLuint index = static_cast<GLuint>(c.index);
+ GLuint binding = static_cast<GLuint>(c.binding);
+ Program* program = GetProgramInfoNotShader(
+ client_id, "glUniformBlockBinding");
+ if (!program) {
+ return error::kNoError;
+ }
+ GLuint service_id = program->service_id();
+ glUniformBlockBinding(service_id, index, binding);
+ return error::kNoError;
+}
+
void GLES2DecoderImpl::OnTextureRefDetachedFromFramebuffer(
TextureRef* texture_ref) {
Texture* texture = texture_ref->texture();

Powered by Google App Engine
This is Rietveld 408576698