|
3e960463
|
2015-11-12T15:58:39
|
|
Detect when gl_FragData is indexed with != 0 in WebGL 2.0
WebGL 2.0 explicitly specifies it to be an error when gl_FragData is
indexed with anything else than constant zero in spec section
'GLSL ES 1.00 Fragment Shader Output'.
This doesn't apply to WebGL 1.0 or GLES.
dEQP-GLES2.functional.shaders.fragdata* test that dynamic indexing of
gl_FragData is allowed.
TEST=angle_unittests
BUG=angleproject:1210
Change-Id: Ib401242e7867f5e7943456b059dd8e24dc404098
Reviewed-on: https://chromium-review.googlesource.com/312045
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
bd163f6a
|
2015-11-13T12:15:38
|
|
Fix parsing structure definitions in place of constructors
The shader parser used to accept structure definitions in place of
constructors, which is invalid GLSL. This patch fixes that.
BUG=angleproject:939
TEST=angle_unittests
Change-Id: Ibcf502160e91c19e693e9427b548a399d83e2a71
Reviewed-on: https://chromium-review.googlesource.com/312032
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
36b0514a
|
2015-11-12T13:10:42
|
|
Fix ESSL3 indexing corner cases
Indexing interface blocks or fragment outputs with a non-constant
expression is not valid even if ANGLE has been able to constant fold
the expression.
BUG=angleproject:1210
TEST=angle_unittests
Change-Id: I2ccb67871b682976a31b8de306053b9b28c06437
Reviewed-on: https://chromium-review.googlesource.com/312044
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
15c2ac30
|
2015-11-09T15:51:43
|
|
Fix constructor parsing issues
After this patch, ANGLE no longer accepts constructors where any of
multiple parameters is sampler or void.
Also, structure array constructors with just one parameter are now
accepted.
Error message for a constructor with no parameters is also more
informative than before.
BUG=angleproject:1193
TEST=angle_unittests
Change-Id: I6b897973448cf500096f612b3b95dcc23aebc716
Reviewed-on: https://chromium-review.googlesource.com/311590
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
7c3848e5
|
2015-11-04T13:19:17
|
|
Allow constant folding some non-constant expressions
This requires removing the assumption that constant folding implies
constness in the constant expression sense from various places in the
code.
This particularly benefits ternary operators, which can now be simplified
if just the condition is a compile-time constant.
In the future, the groundwork that is laid here could be used to implement
more aggressive constant folding of user-defined functions for example.
TEST=angle_unittests
BUG=angleproject:851
Change-Id: I0eede806570d56746c3dad1e01aa89a91d66013d
Reviewed-on: https://chromium-review.googlesource.com/310750
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b1edc4f5
|
2015-11-02T17:20:03
|
|
Accept const array initialization in shader parsing
Array constructors are not folded, unlike all other constant expressions.
Change initializer parsing path so that it accepts constant initializers
whether they are folded or not.
Some parts need to be adapted to work with expressions that are qualified
as constant but that are not necessarily folded:
1. Identifier parsing
2. Indexing parsing
3. Field selection parsing
4. HLSL output for variable declarations
5. Determining unary operator result type
6. Determining binary operator result type
7. Determining built-in function call result type
8. Determining ternary operator result type
Corner cases that are not supported yet:
1. Using array constructors inside case labels
2. Using array constructors inside array size expressions
3. Detecting when a negative constant expression containing an array
constructor is used to index an array
In these cases being able to constant fold the expression is essential to
validating that the code is correct, so they require a more sophisticated
solution. For now we keep the old code that rejects the shader if ANGLE
hasn't been able to constant fold the case label or array size. In case of
indexing an array with a negative constant expression containing an array
constructor, ANGLE will simply treat it as a non-constant expression.
BUG=541551
BUG=angleproject:1094
TEST=dEQP-GLES3.functional.shaders.constant_expressions.* (all pass),
angle_unittests
Change-Id: I0cbc47afd1651a4dece3d68acf7ec72a01fdf047
Reviewed-on: https://chromium-review.googlesource.com/310231
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f541f529
|
2015-10-13T12:21:01
|
|
Fix parsing integers larger than 0x7FFFFFFF
Parsing should accept all values between 0 and 0xFFFFFFFF as specified in
ESSL 3.00 section 4.1.3.
When a signed literal is parsed, it's interpreted as if it specifies the
bit pattern of a two's complement integer. For example, parsing
"0xFFFFFFFF" results in -1. Decimal literals behave the same way, so for
example parsing "3000000000" results in -1294967296.
This change affects parsing of literals in ESSL 1.00 as well. In ESSL
3.00, an out-of-range integer literal now generates a compiler error.
Unit tests are added based on examples in the ESSL 3.00 spec and one
example in GLSL 4.5 spec that ESSL should match.
BUG=541550
TEST=angle_unittests
Change-Id: I82f8ef5cfa2881019a3f80d77ff99707d61c000d
Reviewed-on: https://chromium-review.googlesource.com/305420
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
|
|
b3fbd867
|
2015-09-30T17:55:02
|
|
Fix setting const qualifier on indexing expression
Resubmitting now that separate fix for updating mangled names of types
has been merged. A unit test is added to make sure that the same
regression doesn't happen again.
Previously, constness of indexing expressions did not take the index
expression into account. Now constness correctly takes into account both
the base expression and the index expression.
Setting the type of expressions that index arrays is also simplified.
BUG=angleproject:1170
TEST=angle_unittests
Change-Id: Ie9b6aaee8185b945c03657b13d9513cc55cd2a9f
Reviewed-on: https://chromium-review.googlesource.com/303601
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
e623bd46
|
2015-10-02T19:14:15
|
|
Revert "Fix setting const qualifier on indexing expression"
Failing to compile shaders which are used in some layout_tests,
see http://crbug.com/538692 for logs and bad shaders.
We should diagnose if the shaders are faulty or if there's a
bug in this CL and take appropriate action, but first priority
is to get the tests running again.
BUG=538692
BUG=angleproject:1170
This reverts commit 16a79cd169420cdf0254964b1bac9dd9964a8119.
Change-Id: Iea14c58d87041bcf5ba645b7076ba0936dea6b9d
Reviewed-on: https://chromium-review.googlesource.com/303794
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
16a79cd1
|
2015-09-30T17:55:02
|
|
Fix setting const qualifier on indexing expression
Previously, constness of indexing expressions did not take the index
expression into account. Now constness correctly takes into account both
the base expression and the index expression.
Setting the type of expressions that index arrays is also simplified.
BUG=angleproject:1170
TEST=angle_unittests
Change-Id: Ie2d122020cc252655ab0eea96886b9f85931b80a
Reviewed-on: https://chromium-review.googlesource.com/303350
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
cc36b983
|
2015-07-10T14:14:18
|
|
Implement ESSL 3.00 shader input/output variable type rules
ESSL 3.00 allows a wider variety of types of input/output variables
than ESSL 1.00, but there are still specific restrictions on structs,
matrices and arrays.
Some of the checks need to be implemented twice: once for array syntax
where the brackets are after the type, and another time for array syntax
where the brackets are after the variable name.
This requires fixes to constant folding unit tests which were previously
incorrectly using matrix outputs in fragment shaders.
New unit tests are added for several of the rules introduced, but some
cases are also covered by dEQP.
TEST=angle_unittests, dEQP-GLES.functional.shaders.linkage.varying.rules.*
BUG=angleproject:1061
Change-Id: I655b054cfe56d376db775b96a2bb41b3ac5740b0
Reviewed-on: https://chromium-review.googlesource.com/285482
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
8518e7f6
|
2015-07-16T14:54:08
|
|
Make all fragment shader out variables require location layout qualifier
Make all fragment shader out variables require location layout
qualifier. Previously, the last variable did not need a location layout
qualifier if the previous variables had those.
TEST=angle_unittests
BUG=angleproject:1070
Change-Id: Ifb66ee52b811409f5278eaad330d6cd9b8ea059f
Reviewed-on: https://chromium-review.googlesource.com/287100
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6d276c8e
|
2015-07-20T19:00:38
|
|
Revert "Make all fragment shader out variables require location layout qualifier"
Causes a warning on Windows:
compiler\translator\ValidateOutputs.cpp(37): warning C4804: '>' : unsafe use of type 'bool' in operation
BUG=angleproject:1070
This reverts commit 140941d066c11238ba4f2f15647fb2d65ae56faf.
Change-Id: Ieed42cdda22f17c6e15c38ee1c059184869e6919
Reviewed-on: https://chromium-review.googlesource.com/286820
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
140941d0
|
2015-07-16T14:54:08
|
|
Make all fragment shader out variables require location layout qualifier
Make all fragment shader out variables require location layout
qualifier. Previously, the last variable did not need a location layout
qualifier if the previous variables had those.
TEST=angle_unittests
BUG=angleproject:1070
Change-Id: I3763b8ca38b1e14ee8456a54592c01e0fd89692c
Reviewed-on: https://chromium-review.googlesource.com/286101
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
c1ac41bb
|
2015-07-10T13:53:46
|
|
Apply array restriction on qualified types only on ESSL1.00
Add a test that checks that uniforms with an array type are allowed in
ESSL3.00.
TEST=angle_unittests
BUG=angleproject:1061
Change-Id: I6c9e8eeb3e8a6b81522c87039b93bcc0008ae317
Reviewed-on: https://chromium-review.googlesource.com/285481
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
abb0c381
|
2015-07-13T12:01:12
|
|
Check that layout qualifiers may only appear in declarations
In the shading language grammar, layout qualifiers may appear in loop
conditions and function declarations, but this is not valid ESSL 3.00
according to section 4.3.8.
TEST=angle_unittests, dEQP-GLES3.functional.shaders.*layout*
BUG=angleproject:1064
Change-Id: I73f805247bf6678b953f2e1d45a23391e9eacb96
Reviewed-on: https://chromium-review.googlesource.com/285040
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b5841ef2
|
2015-07-08T17:25:22
|
|
Disallow texture lookup functions in global initializers
Do this by simply disallowing all function calls in global initializers
- all built-in math ops are handled as other ops, not function calls.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: Id1107fa294ae4012d5dd3949539d0b7b4cd21943
Reviewed-on: https://chromium-review.googlesource.com/283703
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
846fe05f
|
2015-07-07T17:41:21
|
|
Disable using globals as l-values in global initializers
It should not be possible to use globals as l-values in global initializers.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: I21ab731eb1d92aeae25795856ccae280792ad1f0
Reviewed-on: https://chromium-review.googlesource.com/283910
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
ce39f6ff
|
2015-07-06T15:25:19
|
|
Disallow user-defined function calls in global variable init
Generate an error message when an user-defined function call is found in
a global variable initializer.
Even before this patch, the call graph already marked functions that were
only called from the global scope as unused.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: Iec1b16d2af386f1e5c383f86926d80cef553b694
Reviewed-on: https://chromium-review.googlesource.com/283291
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
c378cd8a
|
2015-05-25T15:21:44
|
|
Check that #version 300 es directive is on the first line
ESSL3.00 and 3.10 specs don't allow even newlines before the version
directive.
BUG=angleproject:1009
TEST=WebGL 2 conformance tests, angle_unittests
Change-Id: Id7967829077e35e03572c724e0eafffbed0c975b
Reviewed-on: https://chromium-review.googlesource.com/272719
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
14e95b38
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
*re-land with fix for unused var in release*
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I63258f4de47e658812822f31601cc235f48c0826
Reviewed-on: https://chromium-review.googlesource.com/271470
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
531e3d22
|
2015-05-15T11:01:27
|
|
Revert "translator: Reject shaders that use both FragColor+FragData."
The change introduced a warning in Windows release build.
This reverts commit b8e3a568bbd16fca1099a1b54cd82a981cd88a8e.
Change-Id: I77bbc35876043c9a164aa2665965f5189ee90052
Reviewed-on: https://chromium-review.googlesource.com/271430
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b8e3a568
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I99111cc6aa05b9352693f9c3b5bc70d56c9842d4
Reviewed-on: https://chromium-review.googlesource.com/269846
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b0c645e2
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
Resubmitting the change, since the previous version neglected to remove
incorrect GLSL tests.
TEST=angle_unittests, WebGL conformance tests, angle_end2end_tests
BUG=angleproject:988
Change-Id: I1bb3b8dc305689a90eadfe8cc7705e5ac3829e03
Reviewed-on: https://chromium-review.googlesource.com/270651
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b6a52bb4
|
2015-05-13T12:41:24
|
|
Revert "Validate global initializer qualifiers"
Seems to be failing angle_end2end_tests:
GLSLTest.GlobalStaticAndVarying_0
GLSLTest.GlobalStaticAndVarying_1
GLSLTest_ES3.GlobalStaticAndInstanceID_0
http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15598
BUG=angleproject:988
This reverts commit 6caa5e815f7e3c11e4452ed5e60446b9943db183.
Change-Id: I394b571c9b4ee739721018c5287a45df49e1471c
Reviewed-on: https://chromium-review.googlesource.com/270589
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6caa5e81
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:988
Change-Id: I6a66f6a31130b44717dd2bef3082a0fc395a60b6
Reviewed-on: https://chromium-review.googlesource.com/270430
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
96e67388
|
2015-04-23T14:27:02
|
|
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
Change-Id: I1389f51751a6a25c1681f57ac3d2d52f31ecc8fb
Reviewed-on: https://chromium-review.googlesource.com/266991
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a2d53039
|
2015-04-15T14:14:44
|
|
Disallow ternary operator on arrays and structs
ESSL specs only allow a limited number of operators on arrays and
structs. The spec section on the ternary operator contradicts this to an
extent, saying that the second and third operands can be "any type" or
"any type other than an array", but we interpret the spec so that the
operator restrictions on structures and arrays override this.
BUG=angleproject:976
TEST=angle_unittests
Change-Id: Icd90d5450dcb94bb23b1683d4cb9e579e82de4ad
Reviewed-on: https://chromium-review.googlesource.com/265644
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
5290174b
|
2015-04-15T13:42:45
|
|
Refactor ternary operator parsing
Refactor ternary operator parsing so that validation is done in
ParseContext and Intermediate's role is simply to create the node added
to the tree.
Remove partially bugged checks for null nodes as a part of this - in
error cases the parser doesn't typically add null nodes to the tree, but
rather always has a fallback to add a dummy node if parsing fails as a
method of recovery. When parsing ternary operators it should be
guaranteed that none of the parameter nodes is null.
Includes a better explanation of why ternary operators are not always
folded when only the condition is constant, and a test to make sure this
doesn't regress.
BUG=angleproject:952
TEST=WebGL conformance tests, angle_unittests
Change-Id: Icbcb721b5ab36cf314a16e79f9814aef1f355fa0
Reviewed-on: https://chromium-review.googlesource.com/265643
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
376f1b5d
|
2015-04-13T13:23:41
|
|
Add support for implicit array size
ESSL3 introduces implicit array size that is determined automatically
according to the initializer. Implicit sizes are resolved when parsing
constructors and when initializers are evaluated, so ANGLE's AST will not
contain implicit sizes.
Declarations where there are two differently sized arrays with the same
implicitly sized type, for example:
float[] a = float[](0.0), b = float[](0.0, 1.0);
will be transformed into declarations where the two arrays don't share
the array size like this:
float a[1] = float[1](0.0), float b[2] = float[2](0.0, 1.0);
so they are not a problem.
Unlike sized arrays, implicitly sized arrays don't have a size limit
enforced by the parser.
Include a test that verifies that non-initialization of an implicitly
sized array defined using ESSL3 type syntax is caught by the parser.
Additionally tested with WebGL 2 test
sdk/tests/deqp/data/gles3/shaders/arrays.html
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:941
Change-Id: Ib55b7601848102a103af9db284a80f09abaeb021
Reviewed-on: https://chromium-review.googlesource.com/265653
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
33e98913
|
2015-04-10T17:03:06
|
|
Add tests for disallowing arrays of arrays
TEST=angle_unittests
BUG=angleproject:941
Change-Id: Ie45a8a581bf2931ecccfc41b26db49a257fcaf1d
Reviewed-on: https://chromium-review.googlesource.com/265201
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
fa33d580
|
2015-04-09T14:33:12
|
|
Improve handling of declarator lists with empty declarations
The code previously failed to check for correctness of layout qualifiers
in case a declarator followed an empty declaration, like so:
layout(packed) uniform float, a;
Fix this by running all necessary declaration checks also for declarators
which follow an empty declaration.
structQualifierErrorCheck is merged into singleDeclarationErrorCheck.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:969
Change-Id: Idcb0673e3bcf64087744ff0d260f51a7546f024a
Reviewed-on: https://chromium-review.googlesource.com/264812
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
43ce600c
|
2015-04-09T14:50:40
|
|
Fix a bunch of mistakes in MalformedShaderTest
A number of mistakes had slipped in to this test that made the
compilation of some shaders always fail regardless of the semantic checks
applied by the parser.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: I9906792e2c7fe3805288255b855afb46840a77a7
Reviewed-on: https://chromium-review.googlesource.com/264811
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
3739d235
|
2015-04-08T12:23:44
|
|
Make checking for array non-constness depend on input version
First, remove duplicate check for const qualifier on arrays. Only keep
the check inside arrayQualifierErrorCheck().
Second, ESSL3 will introduce array initializers and by extension constant
arrays, so it should allow const qualifier on arrays. These checks are
somewhat superfluous in ESSL1 as well, since the parser already checks
for missing initializers, but it's useful to keep the informative error
messages around.
Add a few tests to make sure that when the ESSL3 implementation
progresses, it still checks for missing initializers on constant arrays.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: Id871c872c5b92e2a5bf81c00080ac23004916a75
Reviewed-on: https://chromium-review.googlesource.com/264671
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
93a90fd0
|
2015-04-07T18:14:07
|
|
Remove half-baked non-sized array support
ANGLE used to accept shaders with non-sized arrays in initializer lists.
Fix this. Proper support for implicitly sized arrays will be implemented
later for ESSL3.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: I53c5ccf0f7ef09ad30e142f8350812959fc4846c
Reviewed-on: https://chromium-review.googlesource.com/264360
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ecbfc5c6
|
2015-03-23T15:15:59
|
|
Fix formatting in compiler tests
Remove extraneous semicolons and fix indentation in a couple of places.
TEST=angle_unittests
Change-Id: Iaa51eb50990c0435f41dfd346ec161216cd8d372
Reviewed-on: https://chromium-review.googlesource.com/261823
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ff699005
|
2015-03-23T14:38:42
|
|
Disallow operations on structs containing samplers
ESSL 1.00 spec section 5.9 says that equality operators don't operate on
structs containing sampler types. Section 5.7 also suggests this. ESSL
3.00 doesn't have a similar restriction.
ESSL 1.00 spec section 4.1.7 says that structs containing samplers can't
be used as l-values. This is interpreted to apply also in the case of
ESSL 3.00, which similarly disallows samplers as l-values, but doesn't
explicitly mention structs.
BUG=angleproject:954
TEST=angle_unittests, WebGL conformance tests
Change-Id: I73f74962a192e8d9449990ffa5f3d8c851491601
Reviewed-on: https://chromium-review.googlesource.com/261822
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9dd217bc
|
2015-03-20T14:24:31
|
|
Disallow operations on structures containing arrays in ESSL1
Comparing structures that contain arrays to each other and assigning
structures that contain arrays is "not defined" in ESSL 1.00 (section
5.7). Sections 5.8 and 5.9 further suggest that these operations are not
allowed. Additionally some platform drivers on Linux seem to reject
shaders produced by ANGLE which compare structures containing arrays.
This might require changing the output GLSL version for ESSL 3.00.
BUG=angleproject:954
TEST=angle_unittests
Change-Id: I5f3a016f360f940f2fc1ec1ff8e60d13a977eb69
Reviewed-on: https://chromium-review.googlesource.com/261531
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b2983c95
|
2015-03-18T14:02:46
|
|
Correctly insert unmangled function names to symbol table
This fixes detecting some cases of function parameter mismatch
(previously a mangled function name corresponding to no function
parameters was added to the symbol table for each user-defined function,
and this was returned when doing function lookups with no parameters).
Also fixes detection of reusing a function name as a variable/struct
name.
New unit tests are added to ensure that these fixes don't regress.
BUG=angleproject:936
TEST=angle_unittests, WebGL conformance tests
Change-Id: I2dadde9dcc01c7a4a653c1982c36377b89e6d437
Reviewed-on: https://chromium-review.googlesource.com/260800
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|