Enable the translator to pass parsed interface blocks back to the ANGLE API via the shader translator layer.
TRAC #22930
Signed-off-by: Nicolas Capens
Signed-off-by: Geoff Lang
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2346 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index 6aefaaa..7b3fa75 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -376,6 +376,9 @@
case SH_ACTIVE_UNIFORMS_ARRAY:
*params = (void*)&translator->getUniforms();
break;
+ case SH_ACTIVE_INTERFACE_BLOCKS_ARRAY:
+ *params = (void*)&translator->getInterfaceBlocks();
+ break;
default: UNREACHABLE();
}
}
diff --git a/src/compiler/TranslatorHLSL.cpp b/src/compiler/TranslatorHLSL.cpp
index 37408a0..0819424 100644
--- a/src/compiler/TranslatorHLSL.cpp
+++ b/src/compiler/TranslatorHLSL.cpp
@@ -21,4 +21,5 @@
outputHLSL.output();
mActiveUniforms = outputHLSL.getUniforms();
+ mActiveInterfaceBlocks = outputHLSL.getInterfaceBlocks();
}
diff --git a/src/compiler/TranslatorHLSL.h b/src/compiler/TranslatorHLSL.h
index 9550e15..3cb8b90 100644
--- a/src/compiler/TranslatorHLSL.h
+++ b/src/compiler/TranslatorHLSL.h
@@ -16,11 +16,13 @@
virtual TranslatorHLSL *getAsTranslatorHLSL() { return this; }
const sh::ActiveUniforms &getUniforms() { return mActiveUniforms; }
+ const sh::ActiveInterfaceBlocks &getInterfaceBlocks() const { return mActiveInterfaceBlocks; }
protected:
virtual void translate(TIntermNode* root);
sh::ActiveUniforms mActiveUniforms;
+ sh::ActiveInterfaceBlocks mActiveInterfaceBlocks;
ShShaderOutput mOutputType;
};