summaryrefslogtreecommitdiff
path: root/chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp')
-rw-r--r--chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp b/chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp
index ef62dbfce71..8cbeb7dee1f 100644
--- a/chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp
+++ b/chromium/third_party/angle/src/compiler/translator/PruneEmptyDeclarations.cpp
@@ -66,6 +66,27 @@ bool PruneEmptyDeclarationsTraverser::visitAggregate(Visit, TIntermAggregate *no
ASSERT(parentAgg != nullptr);
mMultiReplacements.push_back(NodeReplaceWithMultipleEntry(parentAgg, node, emptyReplacement));
}
+ else if (sym->getType().getQualifier() != EvqGlobal &&
+ sym->getType().getQualifier() != EvqTemporary)
+ {
+ // We've hit an empty struct declaration with a qualifier, for example like
+ // this:
+ // const struct a { int i; };
+ // NVIDIA GL driver version 367.27 doesn't accept this kind of declarations, so
+ // we convert the declaration to a regular struct declaration. This is okay,
+ // since ESSL 1.00 spec section 4.1.8 says about structs that "The optional
+ // qualifiers only apply to any declarators, and are not part of the type being
+ // defined for name."
+
+ if (mInGlobalScope)
+ {
+ sym->getTypePointer()->setQualifier(EvqGlobal);
+ }
+ else
+ {
+ sym->getTypePointer()->setQualifier(EvqTemporary);
+ }
+ }
}
}
return false;