src/compiler/translator/PruneEmptyDeclarations.cpp


Log

Author Commit Date CI Message
Olli Etuaho 474a08c0 2016-06-28T10:49:46 Remove qualifiers from empty struct declarations in output Empty struct declarations with qualifiers are rejected by NVIDIA GL driver version 367.27. For example this kind of construct that is expected to be accepted by the WebGL conformance tests is rejected: const struct a { int i; }; Since qualifiers do not carry meaning unless a struct declaration has declarators, they can be simply omitted from the translator output in this kind of cases to work around this driver issue. New unit test is added to check that pruning empty declarations works correctly. BUG=angleproject:1430 BUG=622492 TEST=WebGL conformance tests, angle_unittests Change-Id: Id83f83124ae597fcdfa15100d336c2c207d9449c Reviewed-on: https://chromium-review.googlesource.com/356362 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho c6833115 2015-04-22T15:15:54 Prune empty declarations from the AST Empty declarations in ESSL shaders currently result in errors on several platforms. Prune empty declarations that are not struct or interface block declarations from the AST. TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests BUG=angleproject:980 Change-Id: I9e3abf8134e6dfed0253cc83f69ce0ee92b0e0e7 Reviewed-on: https://chromium-review.googlesource.com/266841 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>