diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp b/src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp index 22bf60e86e..f6275defa1 100644 --- a/src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp +++ b/src/3rdparty/angle/src/compiler/translator/TranslatorHLSL.cpp @@ -6,20 +6,26 @@ #include "compiler/translator/TranslatorHLSL.h" -#include "compiler/translator/InitializeParseContext.h" #include "compiler/translator/OutputHLSL.h" +#include "compiler/translator/SimplifyArrayAssignment.h" TranslatorHLSL::TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output) : TCompiler(type, spec, output) { } -void TranslatorHLSL::translate(TIntermNode *root) +void TranslatorHLSL::translate(TIntermNode *root, int compileOptions) { - TParseContext& parseContext = *GetGlobalParseContext(); - sh::OutputHLSL outputHLSL(parseContext, this); + const ShBuiltInResources &resources = getResources(); + int numRenderTargets = resources.EXT_draw_buffers ? resources.MaxDrawBuffers : 1; - outputHLSL.output(); + SimplifyArrayAssignment simplify; + root->traverse(&simplify); + + sh::OutputHLSL outputHLSL(getShaderType(), getShaderVersion(), getExtensionBehavior(), + getSourcePath(), getOutputType(), numRenderTargets, getUniforms(), compileOptions); + + outputHLSL.output(root, getInfoSink().obj); mInterfaceBlockRegisterMap = outputHLSL.getInterfaceBlockRegisterMap(); mUniformRegisterMap = outputHLSL.getUniformRegisterMap(); |