alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 1 | // |
zmo@google.com | 0b8d4eb | 2011-04-04 19:17:11 +0000 | [diff] [blame] | 2 | // Copyright (c) 2002-2011 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/OutputGLSL.h" |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 8 | |
daniel@transgaming.com | 0aa3b5a | 2012-11-28 19:43:24 +0000 | [diff] [blame] | 9 | TOutputGLSL::TOutputGLSL(TInfoSinkBase& objSink, |
shannon.woods@transgaming.com | 1d432bb | 2013-01-25 21:57:28 +0000 | [diff] [blame] | 10 | ShArrayIndexClampingStrategy clampingStrategy, |
daniel@transgaming.com | 0aa3b5a | 2012-11-28 19:43:24 +0000 | [diff] [blame] | 11 | ShHashFunction64 hashFunction, |
| 12 | NameMap& nameMap, |
| 13 | TSymbolTable& symbolTable) |
shannon.woods@transgaming.com | 1d432bb | 2013-01-25 21:57:28 +0000 | [diff] [blame] | 14 | : TOutputGLSLBase(objSink, clampingStrategy, hashFunction, nameMap, symbolTable) |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 15 | { |
| 16 | } |
| 17 | |
zmo@google.com | 5601ea0 | 2011-06-10 18:23:25 +0000 | [diff] [blame] | 18 | bool TOutputGLSL::writeVariablePrecision(TPrecision) |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 19 | { |
alokp@chromium.org | 76b8208 | 2010-03-24 17:59:39 +0000 | [diff] [blame] | 20 | return false; |
| 21 | } |
Jamie Madill | 2aeb26a | 2013-07-08 14:02:55 -0400 | [diff] [blame^] | 22 | |
| 23 | void TOutputGLSL::visitSymbol(TIntermSymbol* node) |
| 24 | { |
| 25 | TInfoSinkBase& out = objSink(); |
| 26 | |
| 27 | if (node->getSymbol() == "gl_FragDepthEXT") |
| 28 | { |
| 29 | out << "gl_FragDepth"; |
| 30 | } |
| 31 | else |
| 32 | { |
| 33 | TOutputGLSLBase::visitSymbol(node); |
| 34 | } |
| 35 | } |