Implement UniformBlockBinding, and necessary state to track uniform block bindings on the API side.
TRAC #22858
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2308 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.h b/src/libGLESv2/Program.h
index a9db834..cb12617 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -92,6 +92,9 @@
GLint getActiveUniformCount();
GLint getActiveUniformMaxLength();
+ void bindUniformBlock(GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ GLuint getUniformBlockBinding(GLuint uniformBlockIndex) const;
+
void addRef();
void release();
unsigned int getRefCount() const;
@@ -107,12 +110,15 @@
DISALLOW_COPY_AND_ASSIGN(Program);
void unlink(bool destroy = false);
+ void resetUniformBlockBindings();
FragmentShader *mFragmentShader;
VertexShader *mVertexShader;
AttributeBindings mAttributeBindings;
+ GLuint mUniformBlockBindings[IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS];
+
BindingPointer<ProgramBinary> mProgramBinary;
bool mLinked;
bool mDeleteStatus; // Flag to indicate that the program can be deleted when no longer in use