Program: Clean up UBO info gathering.

The data size & block member info was getting messy, so clean up
how we query this from the Impl layer.

Also remove the register information from gl::UniformBlock, moving
it into the D3D-only world.

BUG=angleproject:1172

Change-Id: I40af658ebbd6b7c1a4251906a387ebcbb621cf77
Reviewed-on: https://chromium-review.googlesource.com/304150
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/ProgramImpl.h b/src/libANGLE/renderer/ProgramImpl.h
index a94f04b..a9d54b8 100644
--- a/src/libANGLE/renderer/ProgramImpl.h
+++ b/src/libANGLE/renderer/ProgramImpl.h
@@ -66,9 +66,14 @@
     // TODO: synchronize in syncState when dirty bits exist.
     virtual void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) = 0;
 
-    // Gather uniform block active uniform indices, and uniform block offset info.
-    virtual void gatherUniformBlockInfo(std::vector<gl::UniformBlock> *uniformBlocks,
-                                        std::vector<gl::LinkedUniform> *uniforms) = 0;
+    // May only be called after a successful link operation.
+    // Return false for inactive blocks.
+    virtual bool getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const = 0;
+
+    // May only be called after a successful link operation.
+    // Returns false for inactive members.
+    virtual bool getUniformBlockMemberInfo(const std::string &memberUniformName,
+                                           sh::BlockMemberInfo *memberInfoOut) const = 0;
 
   protected:
     const gl::Program::Data &mData;