alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 1 | // |
shannon.woods@transgaming.com | b73964e | 2013-01-25 21:49:14 +0000 | [diff] [blame] | 2 | // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 7 | #include "compiler/TranslatorHLSL.h" |
| 8 | |
alokp@chromium.org | 646ea1e | 2012-06-15 17:36:31 +0000 | [diff] [blame] | 9 | #include "compiler/InitializeParseContext.h" |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 10 | #include "compiler/OutputHLSL.h" |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 11 | |
shannon.woods@transgaming.com | b73964e | 2013-01-25 21:49:14 +0000 | [diff] [blame] | 12 | TranslatorHLSL::TranslatorHLSL(ShShaderType type, ShShaderSpec spec, ShShaderOutput output) |
| 13 | : TCompiler(type, spec), mOutputType(output) |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 14 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 15 | } |
| 16 | |
alokp@chromium.org | 07620a5 | 2010-09-23 17:53:56 +0000 | [diff] [blame] | 17 | void TranslatorHLSL::translate(TIntermNode *root) |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 18 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 19 | TParseContext& parseContext = *GetGlobalParseContext(); |
shannon.woods%transgaming.com@gtempaccount.com | 18b4c4b | 2013-04-13 03:31:40 +0000 | [diff] [blame] | 20 | sh::OutputHLSL outputHLSL(parseContext, getResources(), mOutputType); |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 21 | |
daniel@transgaming.com | 950f993 | 2010-04-13 03:26:14 +0000 | [diff] [blame] | 22 | outputHLSL.output(); |
daniel@transgaming.com | 043da13 | 2012-12-20 21:12:22 +0000 | [diff] [blame] | 23 | mActiveUniforms = outputHLSL.getUniforms(); |
shannonwoods@chromium.org | 3f68bf0 | 2013-05-30 00:12:43 +0000 | [diff] [blame] | 24 | mActiveInterfaceBlocks = outputHLSL.getInterfaceBlocks(); |
Jamie Madill | 46131a3 | 2013-06-20 11:55:50 -0400 | [diff] [blame] | 25 | mActiveOutputVariables = outputHLSL.getOutputVariables(); |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 26 | } |