gfx/angle/src/compiler/timing/RestrictFragmentShaderTiming.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/timing/RestrictFragmentShaderTiming.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +//
     1.5 +// Copyright (c) 2012 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 +#ifndef COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
    1.11 +#define COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
    1.12 +
    1.13 +#include "GLSLANG/ShaderLang.h"
    1.14 +
    1.15 +#include "compiler/intermediate.h"
    1.16 +#include "compiler/depgraph/DependencyGraph.h"
    1.17 +
    1.18 +class TInfoSinkBase;
    1.19 +
    1.20 +class RestrictFragmentShaderTiming : TDependencyGraphTraverser {
    1.21 +public:
    1.22 +    RestrictFragmentShaderTiming(TInfoSinkBase& sink);
    1.23 +    void enforceRestrictions(const TDependencyGraph& graph);
    1.24 +    int numErrors() const { return mNumErrors; }
    1.25 +
    1.26 +    virtual void visitArgument(TGraphArgument* parameter);
    1.27 +    virtual void visitSelection(TGraphSelection* selection);
    1.28 +    virtual void visitLoop(TGraphLoop* loop);
    1.29 +    virtual void visitLogicalOp(TGraphLogicalOp* logicalOp);
    1.30 +
    1.31 +private:
    1.32 +    void beginError(const TIntermNode* node);
    1.33 +    void validateUserDefinedFunctionCallUsage(const TDependencyGraph& graph);
    1.34 +    bool isSamplingOp(const TIntermAggregate* intermFunctionCall) const;
    1.35 +
    1.36 +    TInfoSinkBase& mSink;
    1.37 +    int mNumErrors;
    1.38 +
    1.39 +    typedef std::set<TString> StringSet;
    1.40 +    StringSet mSamplingOps;
    1.41 +};
    1.42 +
    1.43 +#endif  // COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_

mercurial