diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/compiler/translator/LoopInfo.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/LoopInfo.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/LoopInfo.h | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/LoopInfo.h b/src/3rdparty/angle/src/compiler/translator/LoopInfo.h deleted file mode 100644 index ec73fd0fa5..0000000000 --- a/src/3rdparty/angle/src/compiler/translator/LoopInfo.h +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// - -#ifndef COMPILER_TRANSLATOR_LOOPINFO_H_ -#define COMPILER_TRANSLATOR_LOOPINFO_H_ - -#include "compiler/translator/IntermNode.h" - -class TLoopIndexInfo -{ - public: - TLoopIndexInfo(); - - // If type is EbtInt, fill all fields of the structure with info - // extracted from a loop node. - // If type is not EbtInt, only fill id and type. - void fillInfo(TIntermLoop *node); - - int getId() const { return mId; } - void setId(int id) { mId = id; } - TBasicType getType() const { return mType; } - void setType(TBasicType type) { mType = type; } - int getCurrentValue() const { return mCurrentValue; } - - void step() { mCurrentValue += mIncrementValue; } - - // Check if the current value satisfies the loop condition. - bool satisfiesLoopCondition() const; - - private: - int mId; - TBasicType mType; // Either EbtInt or EbtFloat - - // Below fields are only valid if the index's type is int. - int mInitValue; - int mStopValue; - int mIncrementValue; - TOperator mOp; - int mCurrentValue; -}; - -struct TLoopInfo -{ - TLoopIndexInfo index; - TIntermLoop *loop; - - TLoopInfo(); - TLoopInfo(TIntermLoop *node); -}; - -class TLoopStack : public TVector<TLoopInfo> -{ - public: - // Search loop stack for a loop whose index matches the input symbol. - TIntermLoop *findLoop(TIntermSymbol *symbol); - - // Find the loop index info in the loop stack by the input symbol. - TLoopIndexInfo *getIndexInfo(TIntermSymbol *symbol); - - // Update the currentValue for the next loop iteration. - void step(); - - // Return false if loop condition is no longer satisfied. - bool satisfiesLoopCondition(); - - // Check if the symbol is the index of a loop that's unrolled. - bool needsToReplaceSymbolWithValue(TIntermSymbol *symbol); - - // Return the current value of a given loop index symbol. - int getLoopIndexValue(TIntermSymbol *symbol); - - void push(TIntermLoop *info); - void pop(); -}; - -#endif // COMPILER_TRANSLATOR_LOOPINFO_H_ - |