chromium/third_party/angle/src/compiler/translator/VariablePacker.cpp

//
// Copyright 2002 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.
//
// Check whether variables fit within packing limits according to the packing rules from the GLSL ES
// 1.00.17 spec, Appendix A, section 7.

#include <algorithm>

#include "angle_gl.h"

#include "common/utilities.h"
#include "compiler/translator/VariablePacker.h"

namespace sh
{

namespace
{

// Expand the variable so that struct variables are split into their individual fields.
// Will not set the mappedName or staticUse fields on the expanded variables.
void ExpandVariable(const ShaderVariable &variable,
                    const std::string &name,
                    std::vector<ShaderVariable> *expanded);

void ExpandStructVariable(const ShaderVariable &variable,
                          const std::string &name,
                          std::vector<ShaderVariable> *expanded)
{}

void ExpandStructArrayVariable(const ShaderVariable &variable,
                               unsigned int arrayNestingIndex,
                               const std::string &name,
                               std::vector<ShaderVariable> *expanded)
{}

void ExpandVariable(const ShaderVariable &variable,
                    const std::string &name,
                    std::vector<ShaderVariable> *expanded)
{}

int GetVariablePackingRows(const ShaderVariable &variable)
{}

class VariablePacker
{};

struct TVariableInfoComparer
{};

unsigned VariablePacker::makeColumnFlags(int column, int numComponentsPerRow)
{}

void VariablePacker::fillColumns(int topRow, int numRows, int column, int numComponentsPerRow)
{}

bool VariablePacker::searchColumn(int column, int numRows, int *destRow, int *destSize)
{}

bool VariablePacker::checkExpandedVariablesWithinPackingLimits(
    unsigned int maxVectors,
    std::vector<sh::ShaderVariable> *variables)
{}

}  // anonymous namespace

int GetTypePackingComponentsPerRow(sh::GLenum type)
{}

int GetTypePackingRows(sh::GLenum type)
{}

bool CheckVariablesInPackingLimits(unsigned int maxVectors,
                                   const std::vector<ShaderVariable> &variables)
{}

bool CheckVariablesInPackingLimits(unsigned int maxVectors,
                                   const std::vector<ShaderVariable> &variables);

}  // namespace sh