Gather UniformBlock and ShaderStorageBlock separately
Refactor InterfaceBlocks since it only stands for UniformBlock before
ES31. But for ES31, uniform block and shader storage block both belong
to interface block.
This CL will add GetUniformBlocks and GetShaderStorageBlocks in
ShaderLang.h. Meanwhile, keep GetInterfaceBlocks which can return all
the interface blocks together.
BUG=angleproject:1951
Change-Id: I3036e201aadfbd490575ed03538c81bcc3793ff3
Reviewed-on: https://chromium-review.googlesource.com/582546
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index 8a8d7f0..1f47b9d 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -2094,7 +2094,7 @@
if (mState.mAttachedComputeShader)
{
Shader &computeShader = *mState.mAttachedComputeShader;
- const auto &computeInterfaceBlocks = computeShader.getInterfaceBlocks(context);
+ const auto &computeInterfaceBlocks = computeShader.getUniformBlocks(context);
if (!validateUniformBlocksCount(
caps.maxComputeUniformBlocks, computeInterfaceBlocks,
@@ -2109,8 +2109,8 @@
Shader &vertexShader = *mState.mAttachedVertexShader;
Shader &fragmentShader = *mState.mAttachedFragmentShader;
- const auto &vertexInterfaceBlocks = vertexShader.getInterfaceBlocks(context);
- const auto &fragmentInterfaceBlocks = fragmentShader.getInterfaceBlocks(context);
+ const auto &vertexInterfaceBlocks = vertexShader.getUniformBlocks(context);
+ const auto &fragmentInterfaceBlocks = fragmentShader.getUniformBlocks(context);
if (!validateUniformBlocksCount(
caps.maxVertexUniformBlocks, vertexInterfaceBlocks,
@@ -2674,7 +2674,7 @@
{
Shader *computeShader = mState.getAttachedComputeShader();
- for (const sh::InterfaceBlock &computeBlock : computeShader->getInterfaceBlocks(context))
+ for (const sh::InterfaceBlock &computeBlock : computeShader->getUniformBlocks(context))
{
// Only 'packed' blocks are allowed to be considered inactive.
@@ -2698,7 +2698,7 @@
Shader *vertexShader = mState.getAttachedVertexShader();
- for (const sh::InterfaceBlock &vertexBlock : vertexShader->getInterfaceBlocks(context))
+ for (const sh::InterfaceBlock &vertexBlock : vertexShader->getUniformBlocks(context))
{
// Only 'packed' blocks are allowed to be considered inactive.
if (!vertexBlock.staticUse && vertexBlock.layout == sh::BLOCKLAYOUT_PACKED)
@@ -2713,7 +2713,7 @@
Shader *fragmentShader = mState.getAttachedFragmentShader();
- for (const sh::InterfaceBlock &fragmentBlock : fragmentShader->getInterfaceBlocks(context))
+ for (const sh::InterfaceBlock &fragmentBlock : fragmentShader->getUniformBlocks(context))
{
// Only 'packed' blocks are allowed to be considered inactive.
if (!fragmentBlock.staticUse && fragmentBlock.layout == sh::BLOCKLAYOUT_PACKED)