Remove unused params

This commit is contained in:
Dan Sinclair 2019-09-10 15:39:22 -04:00
parent 664ad418f8
commit 24a5d23d5a
2 changed files with 15 additions and 16 deletions

View file

@ -357,7 +357,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
}
// See if the tabled versioning information allows the current version.
bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& spvVersion)
bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile)
{
#ifdef GLSLANG_WEB
// all entries in table are valid
@ -395,11 +395,11 @@ void RelateTabledBuiltins(const BuiltInFunction* functions, TSymbolTable& symbol
} // end anonymous namespace
// Add declarations for all tables of built-in functions.
void TBuiltIns::addTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion)
void TBuiltIns::addTabledBuiltins(int version, EProfile profile)
{
const auto forEachFunction = [&](TString& decls, const BuiltInFunction* function) {
while (function->op != EOpNull) {
if (ValidVersion(*function, version, profile, spvVersion))
if (ValidVersion(*function, version, profile))
AddTabledBuiltin(decls, *function);
++function;
}
@ -417,8 +417,7 @@ void TBuiltIns::addTabledBuiltins(int version, EProfile profile, const SpvVersio
}
// Relate all tables of built-ins to the AST operators.
void TBuiltIns::relateTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage stage,
TSymbolTable& symbolTable)
void TBuiltIns::relateTabledBuiltins(TSymbolTable& symbolTable)
{
RelateTabledBuiltins(BaseFunctions, symbolTable);
RelateTabledBuiltins(DerivativeFunctions, symbolTable);
@ -485,7 +484,7 @@ TBuiltIns::~TBuiltIns()
//
void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion)
{
addTabledBuiltins(version, profile, spvVersion);
addTabledBuiltins(version, profile);
//============================================================================
//
@ -6287,7 +6286,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
continue;
// Loop over the bTypes
for (int bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) {
for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) {
#ifndef GLSLANG_WEB
if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450))
continue;
@ -8957,7 +8956,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
// operations.
//
relateTabledBuiltins(version, profile, spvVersion, language, symbolTable);
relateTabledBuiltins(symbolTable);
symbolTable.relateToOperator("matrixCompMult", EOpMul);
// 120 and 150 are correct for both ES and desktop

View file

@ -91,8 +91,8 @@ public:
void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources);
protected:
void addTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion);
void relateTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage, TSymbolTable&);
void addTabledBuiltins(int version, EProfile profile);
void relateTabledBuiltins(TSymbolTable&);
void add2ndGenerationSamplingImaging(int version, EProfile profile, const SpvVersion& spvVersion);
void addSubpassSampling(TSampler, const TString& typeName, int version, EProfile profile);
void addQueryFunctions(TSampler, const TString& typeName, int version, EProfile profile);