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

Unified Diff: gpu/command_buffer/client/program_info_manager.h

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/client/program_info_manager.h
diff --git a/gpu/command_buffer/client/program_info_manager.h b/gpu/command_buffer/client/program_info_manager.h
index efbff73f08423072061b687f35d0810fbbdcf484..342e9eacbc01661c7e204a6bd891e77a804d443e 100644
--- a/gpu/command_buffer/client/program_info_manager.h
+++ b/gpu/command_buffer/client/program_info_manager.h
@@ -60,6 +60,12 @@ class GLES2_IMPL_EXPORT ProgramInfoManager {
GLES2Implementation* gl, GLuint program, GLuint index,
GLenum pname, GLint* params);
+ // Attempt to update the |index| uniform block binding.
+ // It's no op if the program does not exist, or the |index| uniform block
+ // is not in the cache, or binding >= GL_MAX_UNIFORM_BUFFER_BINDINGS.
+ void UniformBlockBinding(
+ GLES2Implementation* gl, GLuint program, GLuint index, GLuint binding);
+
private:
friend class ProgramInfoManagerTest;
@@ -126,6 +132,8 @@ class GLES2_IMPL_EXPORT ProgramInfoManager {
// Gets the index of a uniform block by name.
GLuint GetUniformBlockIndex(const std::string& name) const;
const UniformBlock* GetUniformBlock(GLuint index) const;
+ // Update the binding if the |index| uniform block is in the cache.
+ void UniformBlockBinding(GLuint index, GLuint binding);
// Updates the ES2 only program info after a successful link.
void UpdateES2(const std::vector<int8>& result);

Powered by Google App Engine
This is Rietveld 408576698