shairai / angleproject

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

Add support for array length() method in the ESSL3 compiler #972

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the WebGL 2 conformance test 
https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/arrays.
html?webglVersion=2

What is the expected output? What do you see instead?
Expected: length() method tests pass.
Actual: length() method tests fail.

Original issue reported on code.google.com by oetu...@nvidia.com on 13 Apr 2015 at 2:43

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

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

Fix array.length() to return a signed integer

array.length() should return a signed integer as specified in ESSL 3.00
section 4.1.9, not unsigned. Fix this and add a simple unit test - the
dEQP tests included in WebGL conformance are built in a way that they
don't catch the issue.

TEST=angle_unittests
BUG=angleproject:972

src/compiler/translator/ParseContext.cpp
src/tests/compiler_tests/MalformedShader_test.cpp

Original comment by bugdro...@chromium.org on 24 Apr 2015 at 8:45

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

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

Disallow length being called on expressions with side effects

ESSL 3.00 definition of expressions does not include calling length on
anything other than array names, so enforce this restriction in the
parser.

TEST=WebGL 2 conformance tests
BUG=angleproject:972

src/compiler/translator/ParseContext.cpp

Original comment by bugdro...@chromium.org on 24 Apr 2015 at 8:46

GoogleCodeExporter commented 9 years ago

Original comment by oetu...@nvidia.com on 24 Apr 2015 at 8:54