|
4c500944
|
2023-11-08T16:16:23
|
|
Translator: Mark most builtins as not having side effect
This helps the translator eliminate stray uses of these builtins.
Bug: angleproject:6061
Change-Id: Ic0e72bddad5730fb1f906a4c8e53191ab3318d29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5012988
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
02e7f967
|
2023-05-25T14:54:49
|
|
Translator: Remove the "variables" option
Variable collection is invariably enabled by the front-end as well as
other major users of ANGLE such as Firefox. All translator backends
except GLSL force-enable variable collection either way.
This change removes this compile option and enables variable collection
unconditionally.
The flag itself remains in ShCompileOptions until references to it are
removed from Chromium.
Bug: chromium:1447314
Change-Id: I4d3b30c1bfbd345c5ad269abc62c0a6a59de2f56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4568524
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
6f80f0f0
|
2022-08-06T02:29:19
|
|
Translator: Clean up the compile flag passing interface
Historically, compile flags were sent to the translator as a bitmask.
Recently, we were getting close to running out of bits. Additionally,
direct-to-metal work had started to introduce constants to be passed to
the translator, which were misplaced in ShBuiltInResources and Caps.
Recent work on Pixel Local Storage adds even more constants, aggravating
the situation.
In this change, the interface to passing compile flags is reworked. A
struct is passed (instead of a bitmask) that has one bit for each flag.
This can be indefinitely extended. Additionally, the constants needed
by metal and PLS are also placed in this struct. In turn, the backends
can set these options directly, and don't have to hack them into Caps to
further get hacked into ShBuiltInResources.
Bug: angleproject:7559
Change-Id: If93f1e1b8818ad3a0ac708ab04ab93b4b397d114
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812562
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
210773db
|
2021-08-05T10:41:59
|
|
Translator: Be more explicit about precisions
GLSL ES requires that every symbol (variable, block member, function
parameter and return value) is appropriately qualified with a precision,
either individually or through the global precision specifier.
Some tree transformations however produced symbols with EbpUndefined
precision. In text GLSL output, these would produce unqualified symbols
which was often incorrect.
In this change, the transformations are made to produce explicit / more
consistent precisions. The validation (that caught these issues) is not
included in this change as there are still a few corner cases left to
address.
Bug: angleproject:4889
Bug: angleproject:6132
Change-Id: Icca8a0a5476f8646226e7243aa8f501f44acc164
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3075127
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a5dd3888
|
2019-12-04T14:31:57
|
|
Vulkan: fix handling of inactive atomic counters
The translator emulates atomic counters with a storage buffer array
during translation to Vulkan GLSL. Glslang wrapper then should assign
set/binding to this buffer. However, if the atomic counters are
actually unused in the shader, this assignment is never done.
This change adds a small tree transformation for Vulkan that removes any
uniform or interface block declaration that's not active. In
particular, this makes atomic counter emulation a no-op if no atomic
counters are used. It also has the benefit of not requiring glslang
wrapper to remove such inactive resources.
Bug: angleproject:4190
Change-Id: I286c199854ec2379558ad1ec48b4d2c4bf5544d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951523
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
90a58622
|
2019-09-04T15:39:58
|
|
Refactor ShaderVariable to Remove Specializations
The following structs are being refactored and moved into the parent
struct ShaderVariable:
VariableWithLocation
Uniform
Attribute
OutputVariable
InterfaceBlockField
Varying
Bug: angleproject:3899
Test: CQ
Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
9d737966
|
2019-08-14T12:25:12
|
|
Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
"The ANGLE Project Authors"
These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.
BUG=angleproject:3811
Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e600c0aa
|
2018-03-02T11:23:29
|
|
Use non-human-readable mangled names for types
The new mangled name format is as follows:
The first character is a hex digit from 0 to F that encodes vector or
matrix size. For scalars, structs etc. the character is 0.
Then, if it's a struct, the mangled name continues with "{s", followed
by mangled names of fields, and ends with "}".
If it's an interface block, the mangled name continues with "{i",
followed by mangled names of fields, and ends with "}".
If it's anything else, the second alphabetic character encodes the
basic type. Characters are assigned to basic types in the enumeration
order.
If it's an array, the mangled name has a suffix [array_size].
This saves a few kilobytes from the binary size. The effect on symbol
lookup speed seems mostly marginal.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I26e65dcb48c3478df9a719ffff9c15f2fd12e293
Reviewed-on: https://chromium-review.googlesource.com/945910
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
d6fef528
|
2018-03-01T13:41:13
|
|
Shorten mangled names of types
This will reduce binary size by a few kilobytes once we store mangled
names of functions as constexpr strings.
This still keeps mangled names human readable.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ia63980bd511c701a93e2c5e247d24578c7d7f332
Reviewed-on: https://chromium-review.googlesource.com/943101
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
4728bdc8
|
2017-12-20T17:51:08
|
|
Unify looking for symbols with a specific name in the AST
Keep only one traverser for looking up symbol nodes by name instead
of having two largely identical ones.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I36e906258180e22b7b1353cab79d90266d99fa0e
Reviewed-on: https://chromium-review.googlesource.com/836895
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4336489f
|
2017-02-13T16:00:12
|
|
Parse binding layout qualifier for opaque types
This patch adds binding layout qualifier support for opaque types.
Binding layout qualifier on blocks is not yet supported.
This includes support for GLSL output and some minor simplification of
related functionality in ParseContext.
TEST=angle_unittests, dEQP-GLES31.functional.layout_binding.*
BUG=angleproject:1442
Change-Id: I53fb505b5a539bccee70613f3969fba81965ae84
Reviewed-on: https://chromium-review.googlesource.com/441586
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
72fc5547
|
2016-12-19T19:53:29
|
|
Add a ShaderCompileTreeTest base class to use in compiler tests
The test class provides facilities for parsing test shader source into
an AST and determining compile status. Compilation flags change for
some of the tests, but this should only have a minor effect on code
coverage - mostly affecting non-core parts such as intermediate
output.
BUG=angleproject:1673
TEST=angle_unittests
Change-Id: I7d0900ef490e021272a27c4b0c938bfee02abf39
Reviewed-on: https://chromium-review.googlesource.com/422367
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
049edfa2
|
2016-11-11T14:35:37
|
|
Add volatile, coherent and restrict memory qualifiers
The patch adds support for the three remaining memory qualifiers:
volatile, coherent and restrict.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: Ie662d304af2399468df1d976e04c38dada1e2cec
Reviewed-on: https://chromium-review.googlesource.com/385876
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: 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>
|
|
acb4b81a
|
2016-11-07T13:50:29
|
|
translator: Put ShaderLang APIs in "sh" namespace.
Working with glslang in Vulkan means we are static linking libANGLE
with functions that have the same name as our translator APIs. We
can fix this by scoping our APIs. We don't need to scope the types
of the file, since they don't conflict.
This will require a follow-up patch to remove the unscoped APIs
once we switch over Chromium.
We also scope TCompiler and some related classes to avoid multiply
defined link errors with glslang.
BUG=angleproject:1576
Change-Id: I729b19467d2ff7d374a82044b16dbebdf2dc8f16
Reviewed-on: https://chromium-review.googlesource.com/408337
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2cc85b3b
|
2016-08-05T16:22:53
|
|
Add support for images in the compiler
The patch adds support for GLSL ES 3.1 image types.
Internal format layout qualifiers for images are added.
Support for the readonly and writeonly qualifiers are added. The other
memory qualifiers are omitted as to make the patch simpler.
Tests are added which check for correct and incorrect usage of images,
internal format layout and memory qualifiers.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: Ie4d3acb2a195de11b405ad54110a04c4c1de0b7e
Reviewed-on: https://chromium-review.googlesource.com/378855
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|