tweak error behavior for redeclared uniforms for vulkan-relaxed
avoids nullptr crash from reading memberType's name, and more user friendly error message.
This commit is contained in:
parent
f8dd5adde4
commit
1dde7113bb
3 changed files with 59 additions and 42 deletions
|
|
@ -626,10 +626,8 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
|
|||
if (symbol) {
|
||||
if (memberType != symbol->getType()) {
|
||||
TString err;
|
||||
err += "\"" + memberType.getCompleteString() + "\"";
|
||||
err += " versus ";
|
||||
err += "\"" + symbol->getType().getCompleteString() + "\"";
|
||||
error(loc, "Types must match:", memberType.getFieldName().c_str(), err.c_str());
|
||||
err += "Redeclaration: already declared as \"" + symbol->getType().getCompleteString() + "\"";
|
||||
error(loc, "", memberName.c_str(), err.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue