Merge pull request #2705 from pkasting/master
Fix some instances of -Wunused-but-set-variable.
This commit is contained in:
commit
4a12ee1ae3
@ -4400,7 +4400,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
||||
{
|
||||
// Name and decorate the non-hidden members
|
||||
int offset = -1;
|
||||
int locationOffset = 0; // for use within the members of this struct
|
||||
bool memberLocationInvalid = type.isArrayOfArrays() ||
|
||||
(type.isArray() && (type.getQualifier().isArrayedIo(glslangIntermediate->getStage()) == false));
|
||||
for (int i = 0; i < (int)glslangMembers->size(); i++) {
|
||||
@ -4458,10 +4457,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
||||
if (!memberLocationInvalid && memberQualifier.hasLocation())
|
||||
builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation);
|
||||
|
||||
if (qualifier.hasLocation()) // track for upcoming inheritance
|
||||
locationOffset += glslangIntermediate->computeTypeLocationSize(
|
||||
glslangMember, glslangIntermediate->getStage());
|
||||
|
||||
// component, XFB, others
|
||||
if (glslangMember.getQualifier().hasComponent())
|
||||
builder.addMemberDecoration(spvType, member, spv::DecorationComponent,
|
||||
|
@ -6689,12 +6689,6 @@ void HlslParseContext::globalQualifierFix(const TSourceLoc&, TQualifier& qualifi
|
||||
|
||||
//
|
||||
// Merge characteristics of the 'src' qualifier into the 'dst'.
|
||||
// If there is duplication, issue error messages, unless 'force'
|
||||
// is specified, which means to just override default settings.
|
||||
//
|
||||
// Also, when force is false, it will be assumed that 'src' follows
|
||||
// 'dst', for the purpose of error checking order for versions
|
||||
// that require specific orderings of qualifiers.
|
||||
//
|
||||
void HlslParseContext::mergeQualifiers(TQualifier& dst, const TQualifier& src)
|
||||
{
|
||||
@ -6712,8 +6706,7 @@ void HlslParseContext::mergeQualifiers(TQualifier& dst, const TQualifier& src)
|
||||
mergeObjectLayoutQualifiers(dst, src, false);
|
||||
|
||||
// individual qualifiers
|
||||
bool repeated = false;
|
||||
#define MERGE_SINGLETON(field) repeated |= dst.field && src.field; dst.field |= src.field;
|
||||
#define MERGE_SINGLETON(field) dst.field |= src.field;
|
||||
MERGE_SINGLETON(invariant);
|
||||
MERGE_SINGLETON(noContraction);
|
||||
MERGE_SINGLETON(centroid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user