| 
              
85264808
               | 
              
2024-07-18T09:53:14
               | 
              
               | 
              
tls.h: check ANGLE_USE_ANDROID_TLS_SLOT to define GL TLS
The definitions of ANGLE_ANDROID_GET_GL_TLS() macro were guarded by
ANGLE_PLATFORM_ANDROID, but the use by ANGLE_USE_ANDROID_TLS_SLOT.
This change makes it so both definition and the use use the same macro.
Additionally, make libGLESv2/global_state.h include common/tls.h when
ANGLE_USE_ANDROID_TLS_SLOT is defined, even if ANGLE_PLATFORM_ANDROID is
missing. This will enable the use of Android TLS in builds that use
bionic on systems that are not full Android (see bug for details).
The change is supposed to have no impact on existing code.
Bug: b/353262025
Test: treehugger
Change-Id: I4406aa4642c4a589a53dd8e0ff6c41234942901b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5729840
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
               | 
            
            
              
   
               | 
              
c2c8b062
               | 
              
2023-05-11T22:38:48
               | 
              
               | 
              
[Risc-V] Fix definition of kAndroidOpenGLTlsSlot.
On Risc-V, ANGLE was using a TLS offset of 3.
This worked... sometimes!
On Risc-V, the android OpenGL TLS slot is supposed to be -5,
as per tls_defines.h.
Tested by running cuttlefish with Swiftshader + ANGLE on Risc-V
Bug: b/273278430
Change-Id: Ib32f7dbcc158085b75f4befc277a03229ff87152
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4521034
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Jean-François Geyelin <jif@chromium.org>
               | 
            
            
              
   
               | 
              
1acc6d40
               | 
              
2023-04-21T17:03:49
               | 
              
               | 
              
Vulkan: Use Android TLS for *valid* global context
... instead of just global context.  This means that the majority of
calls which call GetValidGlobalContext() will be faster (because they
don't need to check for context loss).
Bug: angleproject:8135
Change-Id: Ia91f8fadb5799088542c58d417f31c3e5028b3e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4454769
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
               | 
            
            
              
   
               | 
              
6c172e4b
               | 
              
2021-11-20T16:27:14
               | 
              
               | 
              
Add support for memory cleanup on process exit
This patch adds a callback to cleanup memory on process exit.
Bug: angleproject:6723
Test: Android CTS WrapperTest.testThreadCleanup
Change-Id: Ia517d4c6ae280ddc1f17a3b6f77d437aaaad0678
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294581
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
               | 
            
            
              
   
               | 
              
fbf8d1ea
               | 
              
2021-10-07T13:53:05
               | 
              
               | 
              
Remove windows.h from common/platform.h
Windows.h is expensive and causes lots of namespace pollution with the
macros that it defines. This change removes windows.h from platform.h
and debug.h and adds the necessary typedes and new include of windows.h
to let Chromium build.
This reduces the number of Angle translation units that include
windows.h by about a third, from 624 to 440. Significant further
reductions will be difficult because of translation units that genuinely
need windows.h.
Earlier versions of this change made it clear that the DeleteFile and
GetCurrentTime macros were renaming Angle functions. These angle
functions were renamed which makes this change much simpler.
Bug: angleproject:6283
Change-Id: Icddc8f98b19485e563b2cf616bba2ad4ea49228e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212639
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
               | 
            
            
              
   
               | 
              
cb286073
               | 
              
2020-09-20T21:59:24
               | 
              
               | 
              
Use c++ thread_local for current thread.
This solves a race condition using the global context.
Sadly we can't use an unprotected variable safely because
it can be written/read from multiple threads doing MakeCurrent.
Has about a 2 ns regression when tested in Linux/Release per
call. "null" benchmark test went from 27 -> 29 ns/iteration.
Fixes a TSAN warning that popped up in angle_end2end_tests.
Test: DrawCallPerfBenchmark.Run/vulkan_null
Test: EGLContextASANTest.DestroyContextInUse/ES3_Vulkan
Bug: b/168744561
Change-Id: Ic56f3faae81c1087b942a3cfc0e011b9ab439e0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419641
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
               | 
            
            
              
   
               | 
              
f16e94cd
               | 
              
2020-06-17T10:43:19
               | 
              
               | 
              
Prefer retrieval of TLS values through ASM code on Android
On the Android platform prefer using the ASM code to retrieve
TLS context object even for single threaded apps. This helps
get rid of a branch in GetGlobalContext() and GetValidGlobalContext()
further improving the CPU perf of TLS operations.
Bug: angleproject:4717
Change-Id: I58d3d3b7061d613b24f945c07bed497c7c4be25c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2250318
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
               | 
            
            
              
   
               | 
              
33c28e35
               | 
              
2020-06-12T08:17:47
               | 
              
               | 
              
Optimize thread specific storage and retrieval with native ASM
Android reserves specific TLS slots to store thread specific
values. Given that the Context object gets queried on every
call we leverage Android's ASM code to improve the speed of
this operation.
TLS_SLOT_OPENGL is an unused slot in Android and using that
in combination with the ASM code,rather than using the
pthread API, allows angle to store and retrieve thread specific
context object much more efficiently.
Bug: angleproject:4717
Change-Id: I27a117fe82e62407e01c8c372918b866aaea9ee5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231883
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
               | 
            
            
              
   
               | 
              
11dc1635
               | 
              
2019-09-18T14:46:23
               | 
              
               | 
              
Add support for generating UWP (Windows Store) projects again
Until late 2017, ANGLE supported  Windows Store apps on Windows 8.1,
Windows Phone 8.1, and Windows 10 (via the Universal Windows
Platform, aka UWP).
Unfortunately ANGLE deprecated support for Windows Store when it
switched from GYP to GN in 2017. Since then, users have been able
to use Microsoft\angle for their UWP apps but this isn't ideal since
it's based on a 2017 copy of Google\angle.
This PR bring back support for UWPs, so that UWP users can use
Google\angle again. Specifically it:
- Adds support for generating UWP projects via GN
- Adds helper/util functions specific to UWP (they're mostly
similar to the desktop Windows helpers)
- Fixes some existing Windows Store code that's rotted since 2017
- Disables async shader compilation for UWPs, since its
implementation calls wait on the UI thread (which is forbidden
in UWPs)
- Renames 'ANGLE_ENABLE_WINDOWS_STORE' to
'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now
- Fixes misc other related issues (such as dependencies on D3D9
headers in API-agnostic code)
Note that this doesn't bring back support for Windows/Phone 8.1.
BUG=angleproject:3922
Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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>
               | 
            
            
              
   
               | 
              
b8af723d
               | 
              
2015-03-16T22:33:25
               | 
              
               | 
              
Fix and enable warning C4245 (signed/unsigned mismatch)
Change-Id: If48043835fcc98341a0626e3ece7d0e3f7958059
Reviewed-on: https://chromium-review.googlesource.com/260630
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
               | 
            
            
              
   
               | 
              
1edac3b1
               | 
              
2014-11-20T13:49:27
               | 
              
               | 
              
Fixed Visual Studio 2013 Update 4 build failures for WinRT
Change-Id: I393e9800d1c2e902f60728e1f7d0debca66b76a0
Reviewed-on: https://chromium-review.googlesource.com/231140
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
               | 
            
            
              
   
               | 
              
88d3b8cb
               | 
              
2014-10-08T10:41:56
               | 
              
               | 
              
Added IInspectable EGLNativeWindowType and ICoreWindow support
Change-Id: I6dd7fef72a73572d4a3deda7ce36a11da3a75c81
Reviewed-on: https://chromium-review.googlesource.com/224366
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
               | 
            
            
              
   
               | 
              
e020bed5
               | 
              
2014-10-20T16:16:46
               | 
              
               | 
              
Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support"
Causing regressions in the build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/20182
This reverts commit 756aebfc7afa6d0de14e96637ef396dd7b290c2d.
Change-Id: I2f4bdb5aeb429c9bbc5e655a1761704f33737841
Reviewed-on: https://chromium-review.googlesource.com/224221
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
               | 
            
            
              
   
               | 
              
756aebfc
               | 
              
2014-10-08T10:41:56
               | 
              
               | 
              
Added IInspectable EGLNativeWindowType and ICoreWindow support
Change-Id: I34e443b1e194800460e441ac6cee42cf68430564
Reviewed-on: https://chromium-review.googlesource.com/224302
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
               | 
            
            
              
   
               | 
              
8858cf0a
               | 
              
2014-10-17T20:53:32
               | 
              
               | 
              
Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to build failures on Chromium FYI bots.
This reverts commit 406a3be91cc8175df95bd390425e35830778f2d5.
Change-Id: Ica2abd2e557a4fd9852d85b7fc018e3d272b6edf
Reviewed-on: https://chromium-review.googlesource.com/224051
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
               | 
            
            
              
   
               | 
              
406a3be9
               | 
              
2014-10-08T10:41:56
               | 
              
               | 
              
Added IInspectable EGLNativeWindowType and ICoreWindow support
Change-Id: I9ad82b7819bcca1c05e7aa60dc2baec4a7bc403c
Reviewed-on: https://chromium-review.googlesource.com/222360
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
               | 
            
            
              
   
               | 
              
9d6d498c
               | 
              
2014-10-10T19:47:34
               | 
              
               | 
              
Refactor TLS management.
Use cross-platform APIs and constants, and conditionally compile the
Windows-specific DllMain.
BUG=angleproject:783
Change-Id: I8fd2708ab0925cb3207010eb0e759cfc055183ab
Reviewed-on: https://chromium-review.googlesource.com/222955
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Kenneth Russell <kbr@chromium.org>
               | 
            
            
              
   
               | 
              
fb839475
               | 
              
2014-06-16T13:21:41
               | 
              
               | 
              
Fix ifdef complaints in clang
BUG=angle:677
Change-Id: Iee457dfc0990e5ffd61932b1f286f3c0208568bc
Reviewed-on: https://chromium-review.googlesource.com/203427
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
               | 
            
            
              
   
               | 
              
44fa7594
               | 
              
2014-05-30T11:50:07
               | 
              
               | 
              
Refactor platform related functionality into platform.h and tls.h.
Since libGLESv2 and libEGL will eventually be cross platform, it will be
useful to have platform defines and TLS functions that work everywhere.
BUG=angle:664
Change-Id: Ia357925a0992d82e8b446d88d32a1984d319e6e8
Reviewed-on: https://chromium-review.googlesource.com/202133
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
               |