#include <algorithm>
#include "angle_gl.h"
#include "common/utilities.h"
#include "compiler/translator/VariablePacker.h"
namespace sh
{
namespace
{
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)
{ … }
}
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);
}