gfx/angle/src/compiler/OutputGLSL.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/OutputGLSL.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +//
     1.5 +// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +#include "compiler/OutputGLSL.h"
    1.11 +
    1.12 +TOutputGLSL::TOutputGLSL(TInfoSinkBase& objSink,
    1.13 +                         ShArrayIndexClampingStrategy clampingStrategy,
    1.14 +                         ShHashFunction64 hashFunction,
    1.15 +                         NameMap& nameMap,
    1.16 +                         TSymbolTable& symbolTable)
    1.17 +    : TOutputGLSLBase(objSink, clampingStrategy, hashFunction, nameMap, symbolTable)
    1.18 +{
    1.19 +}
    1.20 +
    1.21 +bool TOutputGLSL::writeVariablePrecision(TPrecision)
    1.22 +{
    1.23 +    return false;
    1.24 +}
    1.25 +
    1.26 +void TOutputGLSL::visitSymbol(TIntermSymbol* node)
    1.27 +{
    1.28 +    TInfoSinkBase& out = objSink();
    1.29 +
    1.30 +    if (node->getSymbol() == "gl_FragDepthEXT")
    1.31 +    {
    1.32 +        out << "gl_FragDepth";
    1.33 +    }
    1.34 +    else
    1.35 +    {
    1.36 +        TOutputGLSLBase::visitSymbol(node);
    1.37 +    }
    1.38 +}

mercurial