Define vertex texture sampling intrinsics only when supported
TRAC #12245
This ensures that the shader will fail to compile when using VTF when it's not supported.
Previously an error was generated only at link time and it was not very descriptive.
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@433 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index 45183b0..b83e736 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -56,7 +56,7 @@
builtInShaders[0] = (*i).c_str();
builtInLengths[0] = (int) (*i).size();
- if (PaParseStrings(const_cast<char**>(builtInShaders), builtInLengths, 1, parseContext) != 0)
+ if (builtInLengths[0] && PaParseStrings(const_cast<char**>(builtInShaders), builtInLengths, 1, parseContext) != 0)
{
infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins");
return false;