|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0ca09753
|
2018-09-24T11:00:50
|
|
Add GLES3 support for EXT_blend_func_extended
This adds GLES3 API support for EXT_blend_func_extended. The patch
includes the API entrypoints, validation and also implementation on
the desktop GL backend.
Instead of having built-in fragment color variables, ESSL 3.00 has
custom output variables, which can now be bound to either primary or
secondary output color locations. The "index" set to a custom output
variable determines whether it's used a primary or secondary blending
source color.
The shader layout qualifier takes precedence over the bind call. This
is not specified in the EXT spec, but is specified in desktop OpenGL
specs.
BUG=angleproject:1085
TEST=angle_end2end_tests
Change-Id: Ia24e8e5dadcc165e5e8fbd7c653c7fab6217db88
Reviewed-on: https://chromium-review.googlesource.com/c/1249361
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
a78092cb
|
2018-09-26T14:16:13
|
|
Support ESSL 3.00 EXT_blend_func_extended shaders
This adds support for the index layout qualifier that's used in
EXT_blend_func_extended to set whether a fragment output should be
bound to the primary or secondary blend source color.
Output locations are now validated correctly so that two outputs can
have the same location as long as they have a different index. Some
tests are fixed to allow this.
BUG=angleproject:1085
TEST=angle_unittests
Change-Id: I1de3ad1406398952287791eca367562bed59d380
Reviewed-on: https://chromium-review.googlesource.com/1245982
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
c26214de
|
2018-03-16T10:43:11
|
|
Move AST utilities to a subdirectory
Move AST related utilities to compiler/translator/tree_util.
BUG=angleproject:2409
TEST=angle_unittests
Change-Id: I7567c2f6f2710292029263257c7ac26e2a144ac8
Reviewed-on: https://chromium-review.googlesource.com/966032
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
fbb1c792
|
2018-01-19T16:26:59
|
|
Store symbol names as a ImmutableString
This will enable compile-time initialization of built-in symbols as
well as reducing copying strings.
Most of the code that deals with names is changed to use
ImmutableString where it makes sense to avoid conversions.
The lexer/parser now allocate const char pointers into pool memory
instead of allocating TStrings. These are then converted to
ImmutableString upon entering TParseContext.
BUG=angleproject:2267
TEST=angle_unittests, angle_end2end_tests
Change-Id: I244d6271ea1ecf7150d4f89dfa388a7745a1150c
Reviewed-on: https://chromium-review.googlesource.com/881561
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
8b5e8fdb
|
2017-12-15T14:59:15
|
|
Replace remaining usage of TName with TSymbol
TName used to contain just a subset of the information stored in
TSymbol. It makes more sense to use TSymbol directly instead of
converting it to TName.
This also improves type safety a bit by making some functions only
take in TVariable or TFunction instead of the more generic TName.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Icb46923c25d33ebbbbc06ddc487da25957dda771
Reviewed-on: https://chromium-review.googlesource.com/829143
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
aaa55bfa
|
2017-12-28T11:20:30
|
|
Index symbols by id in ValidateOutputs
This is cleaner than indexing them by their name string.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I6cdc4125fadb6c7049ad8664e8a66da2a9a5bb8d
Reviewed-on: https://chromium-review.googlesource.com/836892
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2a1e8f95
|
2017-07-14T11:49:36
|
|
Refer to GLSL extensions through TExtension enum
Extensions are now referred to by enum values instead of strings most
of the time. This gets rid of unnecessary copying of strings. The code
is easier to work with than before as typoing the extension enum names
will be caught by the compiler.
BUG=angleproject:2147
TEST=angle_unittests
Change-Id: Ifa61b9f86ef03211188fc23bc23a5ce4e4d8c390
Reviewed-on: https://chromium-review.googlesource.com/571002
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
96f6adfa
|
2017-08-16T11:18:54
|
|
Add support for arrays of arrays in AST processing
Data concerning arrays of arrays is added in TType.
Parsing arrays of arrays and support for arrays of arrays in
TPublicType are still left to be implemented later.
ShaderVariable interface for arrays of arrays is also left to be
implemented later.
We rely on existing test coverage to make sure that arrays of arrays
are not accidentally exposed.
BUG=angleproject:2125
TEST=angle_unittests, angle_end2end_tests, angle_deqp_gles31_tests
Change-Id: Ie17d5ac9b8d33958e9126dc0fb40bf1c81ddeec9
Reviewed-on: https://chromium-review.googlesource.com/616146
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
cccf2b00
|
2017-07-05T14:50:54
|
|
Reorganize AST traversal utility code
Define TIntermTraverser and TIntermLValueTrackingTraverser in a
separate header file. hash() function is moved out from
TIntermTraverser as it is not related to the core functionality
of traversing and transforming ASTs.
Also reorganize some traversers to follow common conventions:
- Intermediate output is now in OutputTree.h/.cpp
- Max tree depth check is now in IsASTDepthBelowLimit.h/.cpp
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: Id4968aa9d4e24d0c5bac90dc147fc9f310de0184
Reviewed-on: https://chromium-review.googlesource.com/559531
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
12b0b399
|
2017-05-30T13:22:31
|
|
Clean up ValidateOutputs
Remove the validateOutputs method from Compiler and replace it with a
static method alongside the traverser. This encapsulates the
ValidateOutputs implementation better.
TEST=angle_unittests
BUG=angleproject:2068
Change-Id: I1788cb9726db41ca35fd0e746f8d48ced7fee74f
Reviewed-on: https://chromium-review.googlesource.com/535477
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9ec79391
|
2017-03-31T23:04:23
|
|
Use TLValueTrackingTraverser in ValidateLimitations
Use TLValueTrackingTraverser to determine whether a loop index is used
as an l-value. This replaces custom logic in ValidateLimitations,
greatly simplifying the code. Also pass the symbol table to
ValidateLimitations as a parameter, which removes the need to store a
global pointer to the current ParseContext.
BUG=angleproject:1960
TEST=angle_unittests, WebGL conformance tests
Change-Id: I122c85c78bbea05833d7c787cd184de568c5c45f
Reviewed-on: https://chromium-review.googlesource.com/465606
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
a5527071
|
2017-03-22T16:46:30
|
|
Add support for EXT_YUV_target
Add new sampler type "__samplerExternal2DY2YEXT"
to sample a YUV texture image and output color value
without any color conversion,
new additional type to specify color space standard formula and
built-in functions for yuv to rgb transformation.
Change-Id: I1780650fe84cd75191c1ca1e4118e89d585bfd92
Reviewed-on: https://chromium-review.googlesource.com/454697
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
77ba408a
|
2016-12-16T12:01:18
|
|
Unify Diagnostics interface
Use the same kind of interface for reporting preprocessor errors as
for reporting regular compiler errors, and make global errors like
having too many uniforms also go through Diagnostics. Also don't
create std::string objects unnecessarily.
Includes cleanups of some dead code related to reporting errors.
BUG=angleproject:1670
TEST=angle_unittests
Change-Id: I3ee794d32ddeec1826bdf1b76b558f35259f82c0
Reviewed-on: https://chromium-review.googlesource.com/421527
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d7b1ab58
|
2016-12-12T14:42:19
|
|
Fix up translator style.
Using git cl format.
BUG=angleproject:650
Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761
Reviewed-on: https://chromium-review.googlesource.com/419059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
45bcc784
|
2016-11-07T13:58:48
|
|
translator: Scope all classes with "sh".
I was seeing an odd problem with our PoolAlloc conflicting with the
glslang/Vulkan TIntermNode, so the fix was to move everything to a
separate namespace.
The bison grammars are also regenerated. No functional changes.
BUG=angleproject:1576
Change-Id: I959c7afe4c092f0d458432c07b4dcee4d39513f3
Reviewed-on: https://chromium-review.googlesource.com/408267
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
856c497e
|
2016-08-08T11:38:39
|
|
Clarify error checking function names in the GLSL parser
Most error checking functions in ParseContext used to follow a format
like <property>ErrorCheck. Sometimes this function would check that
the node/value would have <property>, sometimes it would check that
the node/value would not have it, which was confusing. Change most of
these functions to use a lot more descriptive names, which clearly
communicate what they are checking for.
Also includes a bit of refactoring in constructorErrorCheck(), so that
the function only checks for errors rather than also setting the type
of the constructor node.
Also make TType::arraySize unsigned, and return a sanitized size from
checkIsValidArraySize() instead of using an output parameter.
BUG=angleproject:911
TEST=angle_unittests
Change-Id: Id9767b8c79594ad3f782f801ea68eb96df721a31
Reviewed-on: https://chromium-review.googlesource.com/367070
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
5ed23982
|
2016-04-22T15:08:57
|
|
Fix allocation in ValidateOutputs.
We should not be using the pool allocator for destructable objects.
BUG=None
Change-Id: I89236b28f04bd9b7095056edbda4172dbbfe9586
Reviewed-on: https://chromium-review.googlesource.com/340362
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@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>
|
|
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>
|
|
3d0d9a48
|
2015-06-01T12:16:36
|
|
Clean up TIntermTraverser usage
Remove default parameters from TIntermTraverser.
Also clean up a few dead function declarations in traversers.
TEST=angle_unittests, angle_end2end_tests
BUG=angleproject:1037
Change-Id: I8d126c6c2d5b53e8b14e23e3d102f204a59323b3
Reviewed-on: https://chromium-review.googlesource.com/275184
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
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.
|