Compiler - only declare used HLSL functions

TRAC #11315 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@75 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5e417109
...@@ -23,6 +23,7 @@ class OutputHLSL : public TIntermTraverser ...@@ -23,6 +23,7 @@ class OutputHLSL : public TIntermTraverser
OutputHLSL(TParseContext &context); OutputHLSL(TParseContext &context);
void header(); void header();
void footer();
protected: protected:
void visitSymbol(TIntermSymbol*); void visitSymbol(TIntermSymbol*);
......
...@@ -7,16 +7,19 @@ ...@@ -7,16 +7,19 @@
#include "TranslatorHLSL.h" #include "TranslatorHLSL.h"
#include "OutputHLSL.h" #include "OutputHLSL.h"
TranslatorHLSL::TranslatorHLSL(EShLanguage l, int dOptions) TranslatorHLSL::TranslatorHLSL(EShLanguage language, int debugOptions)
: TCompiler(l), : TCompiler(language), debugOptions(debugOptions)
debugOptions(dOptions) { {
} }
bool TranslatorHLSL::compile(TIntermNode* root) { bool TranslatorHLSL::compile(TIntermNode *root)
{
TParseContext& parseContext = *GetGlobalParseContext(); TParseContext& parseContext = *GetGlobalParseContext();
sh::OutputHLSL outputHLSL(parseContext); sh::OutputHLSL outputHLSL(parseContext);
outputHLSL.header(); outputHLSL.header();
parseContext.treeRoot->traverse(&outputHLSL); parseContext.treeRoot->traverse(&outputHLSL);
outputHLSL.footer();
return true; return true;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment