|
80ecac9e
|
2015-08-25T15:37:48
|
|
Remove unused mOptimize/mDebug flags from TIntermAggregate
These flags were written but they were never read.
TEST=compile
BUG=angleproject:1116
Change-Id: I41e3e89f13861ebda4828c76c753ca17c74c4358
Reviewed-on: https://chromium-review.googlesource.com/294931
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
185fb403
|
2015-06-12T15:48:48
|
|
Move function prototypes and declarations out of the .y
This will make the code easier to edit and maintain.
BUG=none
TEST=angle_unittests,angle_end2end_tests
Change-Id: I955307d1209170fa99142103bc4d361c9eab1cc8
Reviewed-on: https://chromium-review.googlesource.com/286145
Tested-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>
|
|
01971113
|
2015-07-10T14:54:00
|
|
Cache TTypes.
*re-land with build fix for Win/Release*
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I4382c55b2480f70b00c5d117fcb7e0c51d0dfbb4
Reviewed-on: https://chromium-review.googlesource.com/284735
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Dmitry Skiba <dskiba@google.com>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
|
|
53b76107
|
2015-07-10T18:52:58
|
|
Revert "Cache TTypes."
Unused variable warning in Release:
warning C4189: 'MaxEnumValue' : local variable is initialized but not referenced
I'll handle fixing this.
BUG=492725
This reverts commit b25d14e4b39ee273fad3bb585c3a3a929b3f794c.
Change-Id: I502fc5288d5d3c48ecd43f84acdf66b7e300ad22
Reviewed-on: https://chromium-review.googlesource.com/284863
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b25d14e4
|
2015-06-23T17:43:14
|
|
Cache TTypes.
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I7b8053c032c9c68f646162baf61abf6db3afe52e
Reviewed-on: https://chromium-review.googlesource.com/284003
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
2f232370
|
2015-07-07T21:57:55
|
|
Revert "Cache TTypes."
Lots of compile errors.
BUG=492725
This reverts commit 5377720aae042c5bfae0e8a37032c90dc3ab78cf.
Change-Id: I64889b99b1f1f48d39b87ebb668f6a32a3abac45
Reviewed-on: https://chromium-review.googlesource.com/283945
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5377720a
|
2015-06-23T17:43:14
|
|
Cache TTypes.
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I2ee748f7271b1afe0834083cbff6f0b84104aa53
Reviewed-on: https://chromium-review.googlesource.com/281411
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Dmitry Skiba <dskiba@google.com>
|
|
7f17a50c
|
2015-06-22T15:08:39
|
|
Store TFunction::returnType by a const pointer.
On 32-bit Android this change saves ~30KiB per compiler instance.
BUG=492725
Change-Id: I8bea48d57ee7eac0a0ee417035085c0d335aea09
Reviewed-on: https://chromium-review.googlesource.com/281047
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Dmitry Skiba <dskiba@google.com>
|
|
efa3d8eb
|
2015-06-22T14:52:10
|
|
Change TSymbolTable::insertBuiltIn() TType* pointers to const.
Const types make it possible to implement caching and
other optimizations.
BUG=492725
Change-Id: I64398bb9effcc909dd052a038acbb5ec0ca730e8
Reviewed-on: https://chromium-review.googlesource.com/281046
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Dmitry Skiba <dskiba@google.com>
|
|
6e06b1f4
|
2015-05-14T10:01:17
|
|
Make TParseContext a class, with private data.
*re-land with build fix*
BUG=angleproject:995
Change-Id: I67d3ded8f6c705b54fb372857e07ce1a86b58475
Reviewed-on: https://chromium-review.googlesource.com/271162
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
749fe340
|
2015-05-13T21:07:55
|
|
Revert "Make TParseContext a class, with private data."
Causing build errors on Linux:
FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj.rsp /c ..\..\third_party\angle\src\compiler\translator\ParseContext.cpp /Foobj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj /Fdobj\third_party\angle\src\translator_lib.cc.pdb
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : error C2220: warning treated as error - no 'object' file generated
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : warning C4099: 'TParseContext' : type name first seen using 'class' now seen using 'struct'
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\parsecontext.h(28) : see declaration of 'TParseContext'
BUG=angleproject:995
This reverts commit 6c0c2987fba9dcf2a8d432534c9548092281bfa4.
Change-Id: I49a8b7df9bc8b7c4892bf3af5e2c7a6444fba890
Reviewed-on: https://chromium-review.googlesource.com/270767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6c0c2987
|
2015-05-13T13:50:04
|
|
Make TParseContext a class, with private data.
BUG=angleproject:995
Change-Id: Ie077e3a4f0fd5ef840aa35edeb41d15a98b7c0ff
Reviewed-on: https://chromium-review.googlesource.com/270628
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
37ad4744
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. A shading language version dependent varying
matching check is added to the translator API to facilitate this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
A previous revision of this change that broke API compatibility was
reverted since it broke Chromium FYI bots. This revision keeps deprecated
API functionality around for now so that changes can be rolled
step-by-step to Chromium without breakage.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: Iecb64e3afd23e267ba999bc17f44390affcdfc13
Reviewed-on: https://chromium-review.googlesource.com/269940
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
9e64edce
|
2015-05-07T14:08:06
|
|
Revert "Add support for parsing ESSL3 invariant qualifiers"
Build breaks in GPU FYI bots.
BUG=angleproject:987
This reverts commit 4008879357159c7850cf105f2ae842bc68dd3c18.
Change-Id: Ia88ad302c403c65516c050eb7741316b5097bcfb
Reviewed-on: https://chromium-review.googlesource.com/269847
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
40088793
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. The varying matching check in the translator
API is changed to be shading language version dependent to facilitate
this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I3982feff7380c4dfc647940ee03a020692dd0c59
Reviewed-on: https://chromium-review.googlesource.com/267663
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
214c2d8e
|
2015-04-27T14:49:13
|
|
Separate invariance from qualifiers
ESSL3 makes it possible to combine invariant with several more different
qualifiers. To avoid combinatorial explosion of the qualifier enum, track
invariance with a separate boolean.
TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I0c6629e5ca2ded06db9ac9e5bab2fb6480299a5a
Reviewed-on: https://chromium-review.googlesource.com/267662
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
6ba6eadc
|
2015-05-04T14:21:21
|
|
Rename ConstantUnion to TConstantUnion.
This clarified that we're using the Pool allocator/deallocator for
this type.
BUG=angleproject:993
Change-Id: If8c95f6054d07291e7014be0d4e35766ba2e943b
Reviewed-on: https://chromium-review.googlesource.com/269131
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b96687df
|
2015-04-30T15:56:51
|
|
translator: Regenerate with Bison 3.0.4.
BUG=angleproject:463
Change-Id: If89a29de8fb006e8e3b0483ac5df21c8833ce974
Reviewed-on: https://chromium-review.googlesource.com/268511
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ffe6edfd
|
2015-04-13T17:32:03
|
|
Add basic support for the length() method of arrays
Support expressions where the expression that .length() is called on
does not have side effects.
Tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html
TEST=WebGL 2 conformance tests
BUG=angleproject:972
Change-Id: Ib4f8377a51da61179b6e47fbcf6b4d915e351fbd
Reviewed-on: https://chromium-review.googlesource.com/265654
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
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>
|
|
3875ffd1
|
2015-04-10T16:45:14
|
|
Add parser support for initializing sized arrays
Still missing from this patch: HLSL output, implicitly sized arrays.
Tested with WebGL 2 test sdk/tests/deqp/data/gles3/shaders/arrays.html
TEST=WebGL 2 conformance tests
BUG=angleproject:941
Change-Id: I900f2af843fd8046f23dd4b77352e77026bbba84
Reviewed-on: https://chromium-review.googlesource.com/265652
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
e7847b08
|
2015-03-16T11:56:12
|
|
Unify declaration parsing code
Remove the unused identifierSymbol parameter from parseSingleDeclarator
and unify the ordering of parameters and the code style of different
declaration and declarator parsing functions. Some minor functional
changes to array size handling are done mainly to unify error message
generation. There's soon going to be more of these functions, so it's
good to be systematic.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:941
Change-Id: I03b0220de93ca5719fdb7c1790a5999b8cb5b225
Reviewed-on: https://chromium-review.googlesource.com/265202
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
e16eae36
|
2015-04-10T11:48:55
|
|
Fix structQualifierErrorCheck calls in glslang.y
structQualifierErrorCheck is called incorrectly in glslang.y. Remove one
unnecessary call entirely and change another call to samplerErrorCheck.
This will enable further changes to merge structQualifierErrorCheck into
singleDeclarationErrorCheck.
TEST=angle_unittests
BUG=angleproject:969
Change-Id: Ib43233e275fbf4db7e5fda6df6b45a655bdee8a2
Reviewed-on: https://chromium-review.googlesource.com/265200
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
794e0009
|
2015-04-07T18:31:54
|
|
Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82
Reviewed-on: https://chromium-review.googlesource.com/265020
Tested-by: Minmin Gong <mgong@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b3584fb4
|
2015-04-09T17:34:21
|
|
Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)"
Causing a build failure on Mac/Clang:
./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens]
#else if defined(_MSC_VER)
http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136
This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc.
Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7
Reviewed-on: https://chromium-review.googlesource.com/264983
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
3b26e231
|
2015-04-07T18:31:54
|
|
Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea
Reviewed-on: https://chromium-review.googlesource.com/264533
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
71d147f6
|
2015-02-11T11:15:24
|
|
Implemented a CallDAG to allow for more AST analysis
The CallDAG preprocesses the AST to construct a DAG of
functions that can be used for several analyses.
Use it to implement check for recursion and max call
depth. It will also be used to limit the usage of
[[flatten]] and [[unroll]].
BUG=angleproject:937
BUG=395048
Change-Id: I8578703f2d49513f315aecccbcff34914562e4ff
Reviewed-on: https://chromium-review.googlesource.com/263774
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
693c9aa0
|
2015-04-07T17:50:36
|
|
Replace setArray function in TPublicType with functions from TType
Having only one way of setting or clearing arrayness of types clarifies
code dealing with arrays.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: I98cb7c44fd66440c9de8b4c6c4a02827e9300db7
Reviewed-on: https://chromium-review.googlesource.com/264361
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>
|
|
f40319e9
|
2015-03-10T14:33:00
|
|
Add basic support for array constructors
Add limited support for parsing array constructors and writing them out as
GLSL code.
Still missing from this version: HLSL output, array support in
initializer lists, arrays with implicit size.
BUG=angleproject:941
Change-Id: I7febf80923c4cd0b730399f1f49f9456cf3668e9
Reviewed-on: https://chromium-review.googlesource.com/260572
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
186160b2
|
2015-04-02T19:34:38
|
|
Revert "Implemented a CallDAG to allow for more AST analysis"
failures in angle_unittests and compilation failure on clang (see: https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder%20%28dbg%29/builds/30016/steps/compile/logs/stdio) .
This reverts commit b34d1d12969496b1b0fb53934b8ce3200304f900.
Change-Id: Ia995fb2db0e891294f3461de01617cb13e5ae381
Reviewed-on: https://chromium-review.googlesource.com/263727
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b34d1d12
|
2015-02-11T11:15:24
|
|
Implemented a CallDAG to allow for more AST analysis
The CallDAG preprocesses the AST to construct a DAG of
functions that can be used for several analysis.
Use it to implement check for recursion and max call
depth. It will also be used to limit the usage of
[[flatten]] and [[unroll]].
BUG=angleproject:937
BUG=395048
Change-Id: I643e0ed605ad095e4fd7da4977d842be5e6a12e0
Reviewed-on: https://chromium-review.googlesource.com/229352
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c8ef69d2
|
2015-03-18T16:43:22
|
|
Fix C4702 issues (unreachable code) in ANGLE, excluding <xtree>
Change-Id: Ia7603139af266fd7b14efc8c3465225738456e67
Reviewed-on: https://chromium-review.googlesource.com/261038
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d6b14287
|
2015-03-17T14:31:35
|
|
Move binary op array check to ParseContext
Also piece together an addAssign function in ParseContext that uses the
binary op array check. This will make it easier to change the
array-related checks in the future to use shaderVersion. Moving
validation out from IntermBinary::promote also makes the architecture
clearer, promote()'s role should be mainly to determine the type of the
return value of the binary operation, not to do validation.
BUG=angleproject:941
TEST=angle_unittests, WebGL conformance tests
Change-Id: If1de33ea250893527be7f0d7930d4678a0864684
Reviewed-on: https://chromium-review.googlesource.com/260571
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
|
|
2728eda4
|
2015-03-16T10:23:50
|
|
Revert "A special state to track field selection is not necessary."
This reverts commit f8dc4fb66d2ee473b6ba37626f02756422863f6c.
The special state to track field selection is actually necessary to avoid
reduce/reduce conflicts when array constructors are added to the grammar.
BUG=angleproject:941
TEST=WebGL conformance tests, angle_unittests
Change-Id: I55476483c9e83241e8978cd58f05ef303c7c8680
Reviewed-on: https://chromium-review.googlesource.com/260260
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
c4ba3bef
|
2015-03-02T14:42:24
|
|
Refactor addFunctionCallOrMethod out of glslang.y
TEST=angle_unittests
BUG=angle:911
Change-Id: I6d4c0f0bfbf9e6252e241ae5bb1b6acdb463fce6
Reviewed-on: https://chromium-review.googlesource.com/255451
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
53f076fa
|
2015-02-20T10:55:14
|
|
Add basic error checks for switch and case
Check that the case labels have constant scalar integers, and that switch
statements are initialized with scalar integers. Also check that case and
default labels do not exist outside switch statements. Allow break
statements inside switch statements.
Tested by manually disabling shading language version checks for switch
in a Chromium build and checking that the expected errors are generated.
BUG=angle:921
Change-Id: Ibe83d0db52958c493ded5640d4babf670dc02d55
Reviewed-on: https://chromium-review.googlesource.com/251523
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a3a36664
|
2015-02-17T13:46:51
|
|
Implement parsing switch statements
Put in some groundwork for parsing switch statements and case labels in
the parser, including definitions for IntermNode classes. Intermediate
functions for adding the statements are stubbed to only generate errors
for now.
Tested by manually disabling shading language version checks for switch
in a Chromium build and checking that the expected errors are generated.
BUG=angle:921
Change-Id: I064b3e0c4c1b724a083cf5bc78eebfdd3794eb1b
Reviewed-on: https://chromium-review.googlesource.com/250380
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
49300865
|
2015-02-20T14:54:49
|
|
Refactor validating jump statements out of glslang.y
Move the logic to ParseContext. This will simplify changing the logic for
the break statement that is needed to implement switch.
BUG=angle:921, angle:911
TEST=WebGL conformance tests
Change-Id: Ib8bbc7075c05d345e90377202b5446fb3307f94c
Reviewed-on: https://chromium-review.googlesource.com/251522
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b6e07a6a
|
2015-02-16T12:22:10
|
|
Implement ESSL3 modf
This is the first built-in function that has an out parameter, so l-value
checks are added for built-ins.
BUG=angle:918
Change-Id: Ifd5befe955224f706f864e25107879c9cdce9e9f
Reviewed-on: https://chromium-review.googlesource.com/250780
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
ff805cc3
|
2015-02-13T10:59:34
|
|
Separate integer and float modulus
Integer and float modulus are separated into Mod and IMod operator types
to make the code clearer and to make GetOperatorString return the correct
value for both.
Change-Id: Ibfbca2c558bf919b0eab6404d7349f87fe47a18c
Reviewed-on: https://chromium-review.googlesource.com/249692
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
09b22474
|
2015-02-11T11:47:26
|
|
Add addBinaryMath and addUnaryMath helpers to ParseContext
This refactoring reduces code duplication and moves functionality that is
not immediately related to the language grammar out of glslang.y.
BUG=angle:911
Change-Id: If5e225461890ed542dee01905829df1c9a6f5e27
Reviewed-on: https://chromium-review.googlesource.com/248570
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
31b5fc62
|
2015-01-16T12:13:36
|
|
Add support for bitwise operations in ESSL3
Add support for <<, >>, &, |, ^, and their compound assignment variants
<<=, >>=, &=, |=, ^=. Also add support for bitwise not (~).
BUG=angle:870
Change-Id: I5e6a835409589556d5d58d58078fdf505cfd8da5
Reviewed-on: https://chromium-review.googlesource.com/241850
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d68157fc
|
2015-01-16T12:24:17
|
|
Fix issues related to modulus operator
Make sure that "scalar %= vector" is not approved by the compiler, and
that % and %= are only exposed on GLES3.
BUG=angle:854
Change-Id: I3ac7eb607bd86a6caa905d2bef5d397688ad3fd3
Reviewed-on: https://chromium-review.googlesource.com/241410
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2aafa18b
|
2015-01-08T19:04:48
|
|
Fix null check after addUnaryMath is called for a built-in function
The intermTypedNode pointer null check should be done before the pointer
is used, not after. In practice the pointer should never be null if
IntermUnary::promote() is consistent with the built-in function table,
but it's useful to have the null check as a fail-safe when developing.
Change-Id: I24e0d7399ef9d628f474e99fbca08dbd67fdd8c3
Reviewed-on: https://chromium-review.googlesource.com/240411
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
be954a23
|
2014-12-23T00:05:28
|
|
Implement support for the binary operator '%' in the translator.
BUG=angle:854
Change-Id: If116de132dc83d93255749b54c1919a75abcb65c
Reviewed-on: https://chromium-review.googlesource.com/236330
Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
185de884
|
2014-12-22T15:17:52
|
|
Update ANGLE's translator to Bison 3.
BUG=angle:462
Change-Id: I2c1c18027dee1c3b4efb87374caaadbf58367841
Reviewed-on: https://chromium-review.googlesource.com/236930
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
76acee83
|
2014-11-04T13:44:03
|
|
Name mangle function prototypes and print them in interm output
This patch changes function prototype handling so that they get assigned
the same kind of a mangled name as function definitions and function
calls. This name is now also printed in interm output so that function
prototypes can be accurately identified in the interm output.
BUG=angle:821
TEST=compiler_tests
Change-Id: Ia150b8ac5b816b8096c964767cd8666bdee28539
Reviewed-on: https://chromium-review.googlesource.com/227390
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d2a67b96
|
2014-10-21T16:42:57
|
|
Fix precision tracking for built-in function return values
Previously, the type of the return value of all function calls was set to
the type of the return value in the function signature. This did not
carry precision information.
This patch changes this so that the return value precision is set
correctly for built-in functions. For single-argument math functions, it
mostly depends on that addUnaryMath sets the type of the return value to
be the same as the type of the operand. The type is replaced but the
precision information from the operand type is retained when needed. For
multi-argument math functions, precision is determined based on all the
nodes in the aggregate after the type has been set. For texture
functions, the precision is set according the sampler type as per ESSL
1.0 spec. For textureSize, the precision is always highp as per ESSL 3.0
spec.
BUG=angle:787
Change-Id: I48448e3ffe38656b91177dee9b60dd07a03cd095
Reviewed-on: https://chromium-review.googlesource.com/224951
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
de1e00e1
|
2014-10-09T16:55:32
|
|
Implement support of unary operator "+" in translator.
BUG=angle:779
TEST=conformance/glsl/misc/struct-unary-operators.html
Change-Id: Ia827e07dcfc8ad3bbbc078e54336815be9027945
Reviewed-on: https://chromium-review.googlesource.com/222720
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
3b5c2dae
|
2014-08-19T15:23:32
|
|
Add a new invariant declaration operator.
BUG=angle:711
Change-Id: I54a48b636a68c317b8d44ee2d578847b80095289
Reviewed-on: https://chromium-review.googlesource.com/213500
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5f438061
|
2014-08-20T16:38:34
|
|
Only set declaration operator if not already set.
This allows us to return different operators from single
declarations, which will be useful for treating invariant
declarations as different operators.
BUG=angle:711
Change-Id: Id278b91854bbefe8e635380d7b27198198236fef
Reviewed-on: https://chromium-review.googlesource.com/212939
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
47e3ec08
|
2014-08-20T16:38:33
|
|
Add a helper method to parse invariant declarations.
This pulls out more functionality from the grammar into simple
c++ source files.
BUG=angle:711
Change-Id: I19121d710dc1543585361cb53a0deb2ea0479db9
Reviewed-on: https://chromium-review.googlesource.com/212938
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
5c09702f
|
2014-08-20T16:38:32
|
|
Add a getNamedVariable helper method to TParseContext.
This method will be useful in more than one place, since we need
to get a TType from an indentifier when parsing invariant
declarations.
BUG=angle:711
Change-Id: I1c1befbdcc93ea626428fb4e313b8c6326c158f6
Reviewed-on: https://chromium-review.googlesource.com/212937
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
e40d1e9c
|
2014-07-16T17:40:36
|
|
Fix style violations.
BUG=angle:650
TEST=no behavior change
Change-Id: I3096615a181b1ec2c18ce60566c3d6249975b84e
Reviewed-on: https://chromium-review.googlesource.com/208569
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
183bde55
|
2014-07-02T15:31:19
|
|
Return shader variable information using GLenum values.
Instead of duplicating GL header define values, explictly return
GLenum for variable queries in the shader inspection API. This
reduces the duplicate defines in the shader compiler header.
BUG=angle:466
Change-Id: Iddaaff597b188251fa2e546f352bf77ab3ac43bc
Reviewed-on: https://chromium-review.googlesource.com/205860
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
ce505553
|
2014-06-26T14:56:33
|
|
Revert "Return variable type queries using GLenum values."
Breaks the FYI bots until we get Chromium patched.
BUG=angle:466
This reverts commit 53221f5a0382887155d90f7f286e41190d4f5bfb.
Change-Id: Ib28548df5c10a6f76f46e4cf8f2013dca5cf0ee2
Reviewed-on: https://chromium-review.googlesource.com/205850
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
53221f5a
|
2014-06-25T16:04:59
|
|
Return variable type queries using GLenum values.
Instead of duplicating GL header define values, explictly return
GLenum for variable queries in the shader inspection API. This
reduces the duplicate defines in the shader compiler header.
BUG=angle:466
Change-Id: If631b20ce68747297a946e1371def7709027a613
Reviewed-on: https://chromium-review.googlesource.com/204937
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
adfffe46
|
2014-06-17T02:13:36
|
|
Duplicate reused symbol table entries.
BUG=angle:651
Change-Id: Ifce3c19d41a0a5a5ca5ee90ede528adf397d1da5
Reviewed-on: https://chromium-review.googlesource.com/204290
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
74be6a84
|
2014-05-29T14:33:28
|
|
Fix missing bracket in translator source.
Broken in ed14b79dc8e9ec4f4a831bb5213ab67ef01af196.
BUG=angle:628
Change-Id: Ia6b92dd13362bb51f0aa17a14278039d568f5434
Reviewed-on: https://chromium-review.googlesource.com/202182
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ed14b79d
|
2014-05-08T11:21:07
|
|
Shaders should fail compile if a boolean's precision is specified
Tested and no regression on WebGL conformance 1.0.3
BUG=angle:628
BUG=368874
TEST=http://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/boolean_precision.html
Change-Id: Ie74616c3ab846eea19f4bd4a041fc0f00d55f151
Reviewed-on: https://chromium-review.googlesource.com/198884
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
12bea0a9
|
2014-04-11T13:33:55
|
|
Stop shader local variables from using invalid qualifiers.
Local variables in GLSL can't use any other storage qualifier than
'const', but we weren't checking properly. For example, the can't
have 'in' or 'out' storage. This was causing a dEQP conformance
test failure.
BUG=angle:593
Change-Id: Ibb333950f2d0990a47d1a96caecc455497d5e57e
Reviewed-on: https://chromium-review.googlesource.com/191460
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5c55caf3
|
2014-02-18T15:27:18
|
|
Fix bugged tokens marked as reserved/free in ES2.
We had accidentally marked 'smoooth', 'centroid' and 'case'
as reserved in ES2, when they are available as identifiers.
Additionally 'sampler2DShadow' was marked as free, instead
of reserved.
BUG=angle:550
Change-Id: I33ec1b790ad5b4d9a6f4d2ea2e91cec1ca8e7320
Reviewed-on: https://chromium-review.googlesource.com/186970
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
44cc79f6
|
2014-01-03T10:57:22
|
|
Fix compiler crash.
Create a fake variable for function identifiers used as a variable identifier to allow continuing compilation after reporting the error.
BUG=chromium:330222
Change-Id: I96c330694e3503fe2df66621375d2bf76115e325
Reviewed-on: https://chromium-review.googlesource.com/181491
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f9ea3e17
|
2014-01-03T10:21:58
|
|
Regenerate the parser using Bison 2.7.12.
The next patch requires a parser grammar change, but Cygwin's Bison version got updated so this separates the changes caused by that update from the ones for the actual bug fix.
Change-Id: I6a596e02198725c7dbc6a1a356fdbe388ee512d7
Reviewed-on: https://chromium-review.googlesource.com/181490
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6b9cb259
|
2013-10-17T10:45:47
|
|
Rename ParseHelper.cpp/h to ParseContext.cpp/h.
TRAC #24002
Signed-off-by: Shannon Woods
Signed-off-by: Geoff Lang
|
|
17732823
|
2013-08-29T13:46:49
|
|
Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.
|