shairai / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Empty declarations cause compilation errors on some platforms #980

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run WebGL conformance test 
WebGL/sdk/tests/conformance/glsl/misc/empty-declaration.html on Windows or on 
Linux with an NVIDIA GPU.

What is the expected output? What do you see instead?
Expected: test passes
Actual: test fails

Compilers seem to have issues with empty declarations that are followed by 
declarators, like this:

float, a = 0.0;

Original issue reported on code.google.com by oetu...@nvidia.com on 22 Apr 2015 at 12:56

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Olli Etuaho <oetuaho@nvidia.com>
Commit : c68331151337369f03a35da14c98cb58c006f996

Code-Review  0 : Jamie Madill, Zhenyao Mo
Code-Review  +2: Olli Etuaho
Verified     0 : Jamie Madill, Zhenyao Mo
Verified     +1: Olli Etuaho
Commit Queue   : Chumped
Change-Id      : I9e3abf8134e6dfed0253cc83f69ce0ee92b0e0e7
Reviewed-at    : https://chromium-review.googlesource.com/266841

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

src/compiler.gypi
src/compiler/translator/Compiler.cpp
src/compiler/translator/PruneEmptyDeclarations.cpp
src/compiler/translator/PruneEmptyDeclarations.h

Original comment by bugdro...@chromium.org on 24 Apr 2015 at 10:26