alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. |
| 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 | |
| 9 | #include "compiler/OutputHLSL.h" |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 10 | |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 11 | TranslatorHLSL::TranslatorHLSL(EShLanguage language, int debugOptions) |
| 12 | : TCompiler(language), debugOptions(debugOptions) |
| 13 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 14 | } |
| 15 | |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 16 | bool TranslatorHLSL::compile(TIntermNode *root) |
| 17 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 18 | TParseContext& parseContext = *GetGlobalParseContext(); |
| 19 | sh::OutputHLSL outputHLSL(parseContext); |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 20 | |
daniel@transgaming.com | 950f993 | 2010-04-13 03:26:14 +0000 | [diff] [blame] | 21 | outputHLSL.output(); |
daniel@transgaming.com | e78c0c9 | 2010-03-28 19:36:06 +0000 | [diff] [blame] | 22 | |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 23 | return true; |
| 24 | } |