Add support to the HLSL translator for arrays of named interface blocks.
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@2347 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index ca92742..64efe44 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -1178,6 +1178,12 @@
vertexHLSL += "(input." + decorateAttribute(attribute->name) + ");\n";
}
+ if (vertexHLSL.find("dx_initConstantBuffers") != std::string::npos)
+ {
+ vertexHLSL += "\n"
+ " dx_initConstantBuffers();\n";
+ }
+
if (shaderModel >= 4)
{
vertexHLSL += "\n"
@@ -1421,6 +1427,12 @@
else UNREACHABLE();
}
+ if (pixelHLSL.find("dx_initConstantBuffers") != std::string::npos)
+ {
+ pixelHLSL += "\n"
+ " dx_initConstantBuffers();\n";
+ }
+
pixelHLSL += "\n"
" gl_main();\n"
"\n"