Fix unused parameter warning
paramNames was going unused in makeFunctionEntry
This commit is contained in:
parent
fd403737d2
commit
b008c0ee45
3 changed files with 8 additions and 13 deletions
|
|
@ -5495,7 +5495,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
|
||||||
spv::Function* function = builder.makeFunctionEntry(
|
spv::Function* function = builder.makeFunctionEntry(
|
||||||
TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()),
|
TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()),
|
||||||
glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes,
|
glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes,
|
||||||
paramNames, paramDecorations, &functionBlock);
|
paramDecorations, &functionBlock);
|
||||||
builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line,
|
builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line,
|
||||||
paramTypes, paramNames);
|
paramTypes, paramNames);
|
||||||
if (implicitThis)
|
if (implicitThis)
|
||||||
|
|
|
||||||
|
|
@ -2074,11 +2074,6 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
|
||||||
{
|
{
|
||||||
assert(! entryPointFunction);
|
assert(! entryPointFunction);
|
||||||
|
|
||||||
Block* entry;
|
|
||||||
std::vector<Id> paramsTypes;
|
|
||||||
std::vector<char const*> paramNames;
|
|
||||||
std::vector<std::vector<Decoration>> decorations;
|
|
||||||
|
|
||||||
auto const returnType = makeVoidType();
|
auto const returnType = makeVoidType();
|
||||||
|
|
||||||
restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo;
|
restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo;
|
||||||
|
|
@ -2086,7 +2081,8 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
|
||||||
emitNonSemanticShaderDebugInfo = false;
|
emitNonSemanticShaderDebugInfo = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageTypeMax, paramsTypes, paramNames, decorations, &entry);
|
Block* entry = nullptr;
|
||||||
|
entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageTypeMax, {}, {}, &entry);
|
||||||
|
|
||||||
emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo;
|
emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo;
|
||||||
|
|
||||||
|
|
@ -2095,8 +2091,8 @@ Function* Builder::makeEntryPoint(const char* entryPoint)
|
||||||
|
|
||||||
// Comments in header
|
// Comments in header
|
||||||
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
|
Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
|
||||||
const std::vector<Id>& paramTypes, const std::vector<char const*>& paramNames,
|
const std::vector<Id>& paramTypes,
|
||||||
const std::vector<std::vector<Decoration>>& decorations, Block **entry)
|
const std::vector<std::vector<Decoration>>& decorations, Block** entry)
|
||||||
{
|
{
|
||||||
// Make the function and initial instructions in it
|
// Make the function and initial instructions in it
|
||||||
Id typeId = makeFunctionType(returnType, paramTypes);
|
Id typeId = makeFunctionType(returnType, paramTypes);
|
||||||
|
|
|
||||||
|
|
@ -420,10 +420,9 @@ public:
|
||||||
// Make a shader-style function, and create its entry block if entry is non-zero.
|
// Make a shader-style function, and create its entry block if entry is non-zero.
|
||||||
// Return the function, pass back the entry.
|
// Return the function, pass back the entry.
|
||||||
// The returned pointer is only valid for the lifetime of this builder.
|
// The returned pointer is only valid for the lifetime of this builder.
|
||||||
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name,
|
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType,
|
||||||
LinkageType linkType, const std::vector<Id>& paramTypes,
|
const std::vector<Id>& paramTypes,
|
||||||
const std::vector<char const*>& paramNames,
|
const std::vector<std::vector<Decoration>>& precisions, Block** entry = nullptr);
|
||||||
const std::vector<std::vector<Decoration>>& precisions, Block **entry = nullptr);
|
|
||||||
|
|
||||||
// Create a return. An 'implicit' return is one not appearing in the source
|
// Create a return. An 'implicit' return is one not appearing in the source
|
||||||
// code. In the case of an implicit return, no post-return block is inserted.
|
// code. In the case of an implicit return, no post-return block is inserted.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue