Hash :
90a58622
Author :
Date :
2019-09-04T15:39:58
Refactor ShaderVariable to Remove Specializations The following structs are being refactored and moved into the parent struct ShaderVariable: VariableWithLocation Uniform Attribute OutputVariable InterfaceBlockField Varying Bug: angleproject:3899 Test: CQ Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
//
// 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.
#ifndef COMPILER_TRANSLATOR_VARIABLEPACKER_H_
#define COMPILER_TRANSLATOR_VARIABLEPACKER_H_
#include <vector>
#include <GLSLANG/ShaderLang.h>
namespace sh
{
// Gets how many components in a row a data type takes.
int GetTypePackingComponentsPerRow(sh::GLenum type);
// Gets how many rows a data type takes.
int GetTypePackingRows(sh::GLenum type);
// Returns true if the passed in variables pack in maxVectors.
// T should be ShaderVariable or one of the subclasses of ShaderVariable.
bool CheckVariablesInPackingLimits(unsigned int maxVectors,
const std::vector<ShaderVariable> &variables);
} // namespace sh
#endif // COMPILER_TRANSLATOR_VARIABLEPACKER_H_