chromium/third_party/angle/src/compiler/translator/tree_util/DriverUniform.h

//
// Copyright 2020 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.
//
// DriverUniform.h: Add code to support driver uniforms
//

#ifndef COMPILER_TRANSLATOR_TREEUTIL_DRIVERUNIFORM_H_
#define COMPILER_TRANSLATOR_TREEUTIL_DRIVERUNIFORM_H_

#include "common/angleutils.h"
#include "compiler/translator/Types.h"

namespace sh
{

class TCompiler;
class TIntermBlock;
class TIntermNode;
class TSymbolTable;
class TIntermTyped;
class TIntermSwizzle;
class TIntermBinary;

enum class DriverUniformMode
{};

enum class DriverUniformFlip
{};

class DriverUniform
{};

class DriverUniformExtended : public DriverUniform
{};

// Returns either (1,0) or (0,1) based on whether X and Y should remain as-is or swapped
// respectively.  dot((x,y), multiplier) will yield x, and dot((x,y), multiplier.yx) will yield y in
// the possibly-swapped coordinates.
//
// Each component is separately returned by a function
TIntermTyped *MakeSwapXMultiplier(TIntermTyped *swapped);
TIntermTyped *MakeSwapYMultiplier(TIntermTyped *swapped);

}  // namespace sh

#endif  // COMPILER_TRANSLATOR_TREEUTIL_DRIVERUNIFORM_H_