Edit

kc3-lang/angle/src/compiler/TranslatorHLSL.cpp

Branch :

  • Show log

    Commit

  • Author : shannonwoods@chromium.org
    Date : 2013-05-30 00:12:43
    Hash : 3f68bf0e
    Message : 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

  • src/compiler/TranslatorHLSL.cpp
  • //
    // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    #include "compiler/TranslatorHLSL.h"
    
    #include "compiler/InitializeParseContext.h"
    #include "compiler/OutputHLSL.h"
    
    TranslatorHLSL::TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
        : TCompiler(type, spec), mOutputType(output)
    {
    }
    
    void TranslatorHLSL::translate(TIntermNode *root)
    {
        TParseContext& parseContext = *GetGlobalParseContext();
        sh::OutputHLSL outputHLSL(parseContext, getResources(), mOutputType);
    
        outputHLSL.output();
        mActiveUniforms = outputHLSL.getUniforms();
        mActiveInterfaceBlocks = outputHLSL.getInterfaceBlocks();
    }