|   | 25390156 | 2025-08-21T00:13:19 |  | Suppress unsafe buffers on a file-by-file basis in src/ [1 of N]
In this CL, we suppress many files but stop short of actually
enabling the warning by not removing the line from the
unsafe_buffers_paths.txt file. That will happen in a follow-on
CL, along with resolving any stragglers missed here.
This is mostly a manual change so as to familiarize myself with
the kinds of issues faced by the Angle codebase when applying buffer
safety warnings.
-- Re-generate affected hashes.
-- Clang-format applied to all changed files.
-- Add a few missing .reserve() calls to vectors as noticed.
-- Fix some mismatches between file names and header comments.
-- Be more consistent with header comment format (blank lines and
   trailing //-only lines when a filename comment adjoins license
   boilerplate).
Bug: b/436880895
Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | caa5e4ea | 2023-11-30T14:12:42 |  | Translator: Fail compilation if too many struct fields
If there are too many struct fields, SPIR-V cannot be produced (as it
has a hard limit of 16383 fields).  The Nvidia GL driver has also been
observed to fail when there are too many fields.
Bug: chromium:1505009
Change-Id: If9b01716c1cab35a6e537da64421e29fe0eda91e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5074629
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com> | 
            
              |   | 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> | 
            
              |   | 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> | 
            
              |   | 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> | 
            
              |   | 4002e92a | 2018-04-04T16:55:34 |  | Guard traversers used during parsing against stack overflow
Traversers used during parsing can be vulnerable to stack overflow
since the AST has not yet been validated for max depth. Make sure to
check for traversal depth in traversers used during parsing.
We set the maximum traversal depth in ValidateGlobalInitializer and
ValidateSwitchStatementList to 256, which matches the default value
for validating general AST complexity. The depth check is on
regardless of compiler options. In case the traversers go over the
maximum traversal depth, they fail validation.
BUG=angleproject:2453
TEST=angle_unittests
Change-Id: I89ba576e8ef69663ba35d7b9050a6da319f1757c
Reviewed-on: https://chromium-review.googlesource.com/995795
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> | 
            
              |   | f81ce4a3 | 2017-04-24T10:49:17 |  | Refactoring: replace NULL by nullptr for pointers (3rd CL).
This CL mainly handles passing/returning NULL to/from a function.
BUG=angleproject:2001
Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009
Reviewed-on: https://chromium-review.googlesource.com/485060
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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> | 
            
              |   | 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> | 
            
              |   | 7ebb97fc | 2016-09-08T18:01:50 |  | Use 64-bits compile options
BUG=chromium:645071
Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org> | 
            
              |   | 19d1dc99 | 2016-03-08T17:18:46 |  | Add option to limit the number of function parameters
Trying to compile user-defined functions that have thousands of
parameters introduces some instability in native compilers, so it is
better to reject shaders with large numbers of function parameters
in ANGLE.
The check is only enabled if the SH_LIMIT_EXPRESSION_COMPLEXITY flag
is turned on. The default limit for the number of parameters is 1024,
but it can also be configured.
BUG=angleproject:1338
TEST=angle_unittests
Change-Id: I5c9b7a4e97e67f36e77f969368336fa8fffba1c3
Reviewed-on: https://chromium-review.googlesource.com/331970
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> | 
            
              |   | 149e6e69 | 2015-08-07T16:18:18 |  | Fixed compiler warning C4458 'declaration of variable hides class member'.
BUG=angleproject:1119
Change-Id: Ibc7cfdea72abe402cbfa1c10e0ada7576fa1cfa2
Reviewed-on: https://chromium-review.googlesource.com/292052
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@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> | 
            
              |   | 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> | 
            
              |   | 559a2e8c | 2015-03-16T17:25:51 |  | Move the ANGLE tests project to src/
*re-re-land with fix for Chrome's angle tests*
BUG=angleproject:945
Change-Id: I3c64e2edc776c299791440f65f22450855eb6dfa
Reviewed-on: https://chromium-review.googlesource.com/260448
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 96e3f556 | 2015-03-16T21:24:20 |  | Revert "Move the ANGLE tests project to src/"
Still causing build issues on Chrome.
This reverts commit 64a3b2a92fe3bbd28972638e6759fae0b98d81b9.
Change-Id: I8d40fe3dfd0a877343357153a02b8ef66d571c64
Reviewed-on: https://chromium-review.googlesource.com/260425
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org> | 
            
              |   | 64a3b2a9 | 2015-03-16T11:00:20 |  | Move the ANGLE tests project to src/
*re-land with fix for Chromium build*
BUG=angleproject:945
Change-Id: I82bff1760e681987fb26e479734aa62fb845898a
Reviewed-on: https://chromium-review.googlesource.com/260362
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 5491fe66 | 2015-03-16T17:56:18 |  | Revert "Move the ANGLE tests project to src/"
Causing build break in Chromium.
This reverts commit 71c2d85c4af2f6cb213d4f3e15f0ae16b63790f3.
Change-Id: Iedf001c1f4c60a759f69009610fbce978d193d17
Reviewed-on: https://chromium-review.googlesource.com/260370
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org> | 
            
              |   | 71c2d85c | 2015-03-16T10:47:04 |  | Move the ANGLE tests project to src/
BUG=angleproject:945
Change-Id: I2eb44ac43f65b916ddd838d39e6aae62580d7fa0
Reviewed-on: https://chromium-review.googlesource.com/258903
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org> |