|
0980e29d
|
2015-11-20T14:57:34
|
|
Don't accept default precision for uint
Default precision can only be specified for float, int and sampler types.
Default precision for int also applies to uint and uvec declarations.
BUG=angleproject:1221
TEST=angle_unittests
Change-Id: I31fdcde80da16e2ea8771838f7c1a6ab4e478194
Reviewed-on: https://chromium-review.googlesource.com/313314
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5c0e023c
|
2015-11-11T15:55:59
|
|
Qualify stored constant union data with const
This prevents accidentally changing data that may be shared between
multiple TIntermConstantUnion nodes.
Besides making the code less prone to bugs in general, this will make it
easier to implement constant folding of array constructors.
BUG=541551
TEST=angle_unittests, WebGL conformance tests
Change-Id: I4f3059f70b841d9dd0cf20fea4d37684da9cd47e
Reviewed-on: https://chromium-review.googlesource.com/312440
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
e5a1f271
|
2015-08-21T02:58:25
|
|
Use override in all the places where it is possible
This will avoid -Winconsistent-overrides in the future. Done using the
-Wsuggest-override warning of GCC 5.1
BUG=
Change-Id: I707a649dc368f5dd1e139fd144370abcac0b6263
Reviewed-on: https://chromium-review.googlesource.com/294920
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
b18609b9
|
2015-07-16T14:13:11
|
|
Implement ES 2,3 parts of EXT_blend_func_extended for shader translation
Exposes gl_SecondaryFragColor, glSecondaryFragData[] and
gl_MaxDualSourceDrawBuffers to GLES SL 1.0.
Relaxes rules for undefined output locations for GLES SL 3.0
and exposes gl_MaxDualSourceDrawBuffers.
If the output GL context is GL ES 2.0 or 3.0:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports it.
If the output GL context is GL:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports ARB_blend_func_extended or if GL
context is 3.2 or later.
If the source shader spec is GLES SL 2.0: The emulation layer is
expected to inspect the shader compilation output variables upon
linking. If output target is GL SL, the emulation layer should bind
color location 0, index 1 to "angle_SecondaryFragColor" if variable
"gl_SecondaryFragColorEXT" is used. Alternatively, emulation layer
should bind "angle_SecondaryFragData" to locations 0,1,2,3,..., all
color index 1, if "gl_SecondaryFragData" array is used.
(The caller can not bind the locations or specify output variables.)
If the source shader spec is GLES SL 3.0:
The emulation layer is expected to do location auto-resolve of the
the output variables that have undefined output locations that have
not been bound by the caller.
(The caller can not use gl_ built-ins, so nothing to do with those.)
BUG=angleproject:1085
TEST=angle_unittest
Change-Id: I5cafe205b0c29478b0dcd24aa89a7b0000f5d046
Reviewed-on: https://chromium-review.googlesource.com/287580
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
|
|
13e7c7e6
|
2015-07-30T14:17:29
|
|
Revert "Names of built-in functions cannot be redeclared as functions"
Causing failures in the WebGL1 test: conformance/glsl/misc/shader-with-non-reserved-words.html
This reverts commit b5f88853ea80ea112368bb15999b363db0e4c648.
Change-Id: I2105c8040057665abda00435e8c0ff8a83af3645
Reviewed-on: https://chromium-review.googlesource.com/289192
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b5f88853
|
2015-07-23T17:37:39
|
|
Names of built-in functions cannot be redeclared as functions
With ESSL 3.00, names of built-in functions cannot be redeclared as
functions and therefore overloading or redefining builtin functions
is an error.
This is fixed by inserting unmangled built-ins into the symbol table
and then checking if the new function declaration matches any of the
built-in in symbol table.
BUG=angleproject:1066
TEST=angle_unittests(new: ParseESSLFunctionsTest), dEQP Tests
dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function*
(2 tests started passing with this change)
Change-Id: I0e027e588664e604f29c130028178315c3e21631
Reviewed-on: https://chromium-review.googlesource.com/287801
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
58832204
|
2015-07-06T16:11:13
|
|
Calculate TFunction::mangledName lazily.
This saves us ~15KiB per compiler instance on 32-bit Android.
BUG=492725
Change-Id: I9db2998482941b5ab2eb5cb4925cbd1fb58ab4be
Reviewed-on: https://chromium-review.googlesource.com/283584
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
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>
|
|
f0d10f89
|
2015-03-31T12:56:52
|
|
Replace non-copyable macro with a helper class.
This class provides a simpler scheme for blocking default copy
and assignment operators. It also reduces the amount of code
needed since it's inherited to child classes. This also fixes
the conflict between our macro and the same-named macro in
Chromium code.
BUG=angleproject:956
Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f
Reviewed-on: https://chromium-review.googlesource.com/263257
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
|
|
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>
|
|
c9d9b30a
|
2015-02-20T23:02:15
|
|
Set symbol extension at insertion.
BUG=angle:926
Change-Id: I4c96ae89c79d720d99bde803541c3158ba4629ab
Reviewed-on: https://chromium-review.googlesource.com/251662
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
482907eb
|
2015-02-23T16:56:33
|
|
Set symbol operations at insertion.
BUG=angle:926
Change-Id: Ifc8f62ebe1277214a4d3fbd5c56eb5faeff8e389
Reviewed-on: https://chromium-review.googlesource.com/251650
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2c43325d
|
2014-12-03T12:36:54
|
|
Fix double delete with invariant varyings.
The compiler would leave some TString variables lying around
after the pool gets released, leading to a potential crash.
BUG=angle:846
Change-Id: I484ed9b14bba9bf653f6ed4001ae79f87791b0dd
Reviewed-on: https://chromium-review.googlesource.com/232780
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
0a73dd85
|
2014-11-19T16:18:08
|
|
Fix include guards.
BUG=angle:733
Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced
Reviewed-on: https://chromium-review.googlesource.com/230831
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
94ac7b78
|
2014-10-15T18:22:08
|
|
Invariant related processing.
* Fix a bug in PreProcessor for STDGL pragma.
* Record all invariant settings and set them in ShaderVariable.
* Write #pragma STDGL invariant(all) in GL
BUG=angle:776
TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-invariance.html
Change-Id: Ie28b75480deed79f0c9f26e3b98f1778d1290182
Reviewed-on: https://chromium-review.googlesource.com/223610
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
964df49d
|
2014-10-13T11:54:39
|
|
Fix a crash with the WebGL conformance test suite.
Undefined behavior caused by an overflowed enum was causing
the translator symbol table stack to not get popped correctly
when the compiler completed, causing dangling symbols who's storage
was reclaimed and reused when the allocation pool was popped.
The error occurred in the "shader-with-reserved-words" test, which
passes when the compiler fails due to the use of reserved words as
identifiers. As such, this test would pass even if the GPU process
crashes but further tests in the test suite would fail.
BUG=angle::785, 786
Change-Id: I365cb55f962f8dfe409f40532effeb10b8189432
Reviewed-on: https://chromium-review.googlesource.com/223093
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Gus Fernandez <gusfernandez@chromium.org>
|
|
b1a85f48
|
2014-08-19T15:23:24
|
|
Rename compiler intermediate source files.
This prevents confusion between "TIntermediate" and "TIntermNode".
BUG=angle:711
Change-Id: Ib7a086382a479db3f77bf2ab06ce321aa7b35d13
Reviewed-on: https://chromium-review.googlesource.com/212936
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
e740addb
|
2014-07-18T17:01:01
|
|
Add compiler option SH_REGENERATE_STRUCT_NAMES.
BUG=angle:701
TEST=webgl conformance tests
Change-Id: I13b35900956e7d840d5891a5bab90a400347cd6f
Reviewed-on: https://chromium-review.googlesource.com/209229
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@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>
|
|
01f85ac8
|
2014-06-06T11:55:04
|
|
Refactor GLSL scoped structure handling.
With a unique ID, similar to how we handle scoped structures
in the HLSL translator, we can simplify the declared structure
check.
BUG=angle:618
Change-Id: I5fe61c8d353650ac67a7c7ecdf53a70b91a9b717
Reviewed-on: https://chromium-review.googlesource.com/202500
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
bfa91f47
|
2014-06-05T15:45:18
|
|
Redesign HLSL scoped structures to a unique ID.
A unique ID gives a more flexible renaming scheme than our
current method of using nested scope identifiers. The reduced
complexity allows for fewer points of breakage and fixes an
outstanding bug with scoped structures (with added test).
BUG=angle:618
Change-Id: I6551248bb9fa2d185ab67248721f898dd50151f0
Reviewed-on: https://chromium-review.googlesource.com/202183
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
9eedea03
|
2014-05-12T16:02:35
|
|
Fix code styles in OutputGLSLBase, SymbolTable, and Types.
I came across these three classes in the last CL, so do some
cleanup as I touched these classes.
BUG=
TEST=webgl conformance, no regressions
Change-Id: I2819bab5965fcb4917f85c2eded571a7f95ab9a2
Reviewed-on: https://chromium-review.googlesource.com/199423
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@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>
|
|
10567260
|
2014-04-17T16:40:00
|
|
Fix build with Clang.
Clang's validation is a bit more thorough than GCC's or MSVC's and
picked up a few new errors and warnings. We missed a few default
cases in switches and used an improper type for default arguments.
BUG=angle:568
Change-Id: I34239c6c5c785ad1e62917fc37c3243f4c5b5f1b
Reviewed-on: https://chromium-review.googlesource.com/195472
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
bf7db103
|
2014-02-19T17:20:28
|
|
Implement textureGradOffset.
BUG=angle:564
Change-Id: Iad0e452f53469208d55755e14a350b5d2ca83e9d
Reviewed-on: https://chromium-review.googlesource.com/186987
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
759b994b
|
2014-02-14T17:57:14
|
|
Define generic sampler types.
BUG=angle:564
Change-Id: I627f55152000371e73f3e5b4ba6938119fab0223
Reviewed-on: https://chromium-review.googlesource.com/186682
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
1fbc2873
|
2014-01-03T14:12:09
|
|
Add textureOffset intrinsics to the symbol table.
BUG=angle:541
Change-Id: Ied96edd073017a507369319a781b8ed23f60790b
Reviewed-on: https://chromium-review.googlesource.com/181520
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
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.
|