Refactor interface block linking.
This moves the logic for interface block linking. The new design is
intended to be flexible enough to be passed into a back-end call to
ProgramImpl::link. Then, the Impl object can be responsible for both
filtering out unreferenced interface blocks as well as having access
to the linked interface block information.
A future change will pass the InterfaceBlockLinker objects (or objects
when dealing with ES 3.1 and Shader Storage Blocks) to the Impl. This
will help fix a D3D11 back-end bug where we would need acess to the
Shader objects to finish a deferred uniform block link.
This should also potentially make it easier for the back-ends to
determine Shader Storage Block size and properties without defining
new Impl methods.
BUG=angleproject:2208
Change-Id: Ic5244a808dba44ba1a8c08d9ee701952034d2b18
Reviewed-on: https://chromium-review.googlesource.com/746203
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index 50364ea..99f3959 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -646,18 +646,9 @@
void setUniformValuesFromBindingQualifiers();
void gatherAtomicCounterBuffers();
- void gatherComputeBlockInfo(const std::vector<sh::InterfaceBlock> &computeBlocks);
- void gatherVertexAndFragmentBlockInfo(
- const std::vector<sh::InterfaceBlock> &vertexInterfaceBlocks,
- const std::vector<sh::InterfaceBlock> &fragmentInterfaceBlocks);
+ void gatherUniformBlockInfo(const gl::Context *context);
+ void gatherShaderStorageBlockInfo(const gl::Context *context);
void gatherInterfaceBlockInfo(const Context *context);
- template <typename VarT>
- void defineUniformBlockMembers(const std::vector<VarT> &fields,
- const std::string &prefix,
- const std::string &mappedPrefix,
- int blockIndex);
-
- void defineInterfaceBlock(const sh::InterfaceBlock &interfaceBlock, GLenum shaderType);
// Both these function update the cached uniform values and return a modified "count"
// so that the uniform update doesn't overflow the uniform.