|
cfe14e28
|
2020-11-19T18:11:42
|
|
EGL: Remove egl::Error from validation code.
Instead of using an egl::Error return value, errors are recorded
on the egl::Thread immediately at the call site. This makes the
code work the same way as in the GL entry points.
Updates the EGL "try" macros to include a special handler for the
EGL validation entry points. Uses a special ValidationContext
helper class to preserve the existing info.
Bug: angleproject:5378
Change-Id: I897f221a41fe406676950600e4ac559081b9f541
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551790
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d8529380
|
2020-10-20T13:55:23
|
|
Generate CONTEXT_LOST errors on every GL call.
The robustness spec states that all GL calls should generate context
lost errors when the context is lost. This behaviour was lost due to
some context lookup optimizations but can be re-added at no cost by
updating the autogenerated entry points.
Updated the ContextLostTest to cover the repeated error generation
behaviour.
Bug: chromium:1137241
Change-Id: I0b8d1cf4d2a37f13c466c8dd0e66edfe852f7e59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488180
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@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>
|
|
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>
|
|
0a6e118d
|
2020-01-27T13:37:29
|
|
Change g_Mutex from std::mutex to std::recursive_mutex
When running flatland on android-10.0.0_r21 (Pixel 3), libgui's ~EglImage calls
eglTerminate which grabs angle's EGL entry point mutex. The path continues
to libvulkan where eventually another egl call happens (eglDestroyImageKHR) and
it will attempt to take the mutex at the entry point again. So we try to get the
mutex multiple times from the same thread.
Change this mutex to a recursive_mutex to allow for this re-entry of EGL calls
Tests: android-10.0.0_r21/frameworks/native/cmds/flatland
Bug: angleproject:4354
Change-Id: If8a817df45e9f58d5f06884510350e17d7127fa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029218
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
5eadaf85
|
2020-01-13T17:21:53
|
|
Fix and improve UWP build.
Reorganizes the build files to work with a more divided setup. It is
unclear if we'll ever be able to run tests in a UWP config. This at
least sets up the organization so it would at some point be possible.
Bug: angleproject:4182
Change-Id: I49dddfcdc0118b11466fe171f949c28d101ac6a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953484
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
d50151d3
|
2019-12-17T13:57:12
|
|
Move Serial utils to their own file.
This will let the front-end access them without pulling in the rest
of renderer_utils. The Serial class in particular will be useful for
capture/replay.
Also adds a very minimal unit test.
Bug: angleproject:4223
Change-Id: I9e63b8a8227a245b20a8f024b960fcf60c7840db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954611
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
3ff097ff
|
2019-10-31T10:42:00
|
|
Win: Add ANGLE_WAIT_FOR_DEBUGGER option.
Setting this environment variable will make ANGLE pop up a dialog. The
dev can then attach a debugger to this dialog. Only implemented on
Windows currently.
This option is only available when ASSERTs are enabled in libGLESv2.
The code is based on SwiftShader's implementation of WaitForDebugger:
https://cs.chromium.org/chromium/src/third_party/swiftshader/src/Vulkan/main.cpp
Bug: angleproject:4072
Change-Id: I160cb91a423a6d4517f067f2a6f3a2d953b26505
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1892173
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
755417dd
|
2019-09-30T17:53:56
|
|
GLES2: Use require_constant_initialization for g_Mutex
A static assert to verify that the global mutex g_Mutex is trivially
constructed fails to compile with clang when using the STL shipped
with Visual Studio 2019.
Use __attribute__((require_constant_initialization)) instead to verify
for constant initialization.
BUG=angleproject:3936
Change-Id: I5969762ad5a99033143513d7c4992344da276b1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1832164
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@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>
|
|
9ac15d05
|
2019-07-08T10:30:22
|
|
Ensure the global mutex is not locked before deleting it.
It is undefined behaviour to delete a mutex that is locked by a thread. To
ensure that the global mutex is not locked, lock/unlock it before deleting it.
BUG=angleproject:2464
Change-Id: I735e924abfa06070f2b4103230be8593649ca340
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690674
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
067687f4
|
2019-05-29T12:48:49
|
|
Removal global locks from GL entry points. Always lock in EGL.
The ANGLE Vulkan backend is now thread safe for non-share group contexts. This
means that a global GL lock only adds overhead for most use cases.
Remove the angle_force_thread_safety gn argument.
BUG=angleproject:2464
Change-Id: Ic6ba89e18b46e5dd72aa83d0f409097441fcca3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635749
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
77db6f4a
|
2018-09-23T17:28:55
|
|
Use global Context lookup in single-threaded cases.
In single-threaded cases we don't need to use a TLS lookup for the
current Context.
Assume a global context has 3 states: unset, set, and multi-threaded:
* global context unset -> set the global context
* global context set, matches TLS context -> set the global context
* global context set, doesn't match TLS -> set multi-threaded
* global context multi-threaded -> leave it
This also inlines the global context/TLS check into global_state.h.
Increases performance of the binding perf overhead test by up to 25%
and the draw call perf test by up to 3%.
Bug: angleproject:2824
Change-Id: Ib95953ca918f2408fe72ca83061f4e2d1bd1adad
Reviewed-on: https://chromium-review.googlesource.com/1231993
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
b02fc662
|
2018-08-21T09:48:01
|
|
Lock around all EGL and GL calls with a global mutex.
BUG=angleproject:2464
Change-Id: I0231cc84777272f9cf26298c6a137f1ad3fd51d6
Reviewed-on: https://chromium-review.googlesource.com/1183441
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
75359664
|
2018-04-11T01:42:27
|
|
Implement EGL_KHR_debug.
BUG=angleproject:1618
Change-Id: I790944b49badc910b6c72266469fcb8e86ac4252
Reviewed-on: https://chromium-review.googlesource.com/1019387
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d73f852f
|
2017-01-13T17:48:57
|
|
Reland "Replace gl::trace logging with Chromium style logging"
Removing one usage of FormatString() and its static buffer.
And preparation for Platform logging.
Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and
UNREACHABLE(), resulting in increased code size and
<iostream> adding 5 static initializers to chrome because of
cerr referenced in statically linked translator.
BUG=angleproject:1660
Change-Id: I7caa18036118d532e0544f75278602559172ae04
Reviewed-on: https://chromium-review.googlesource.com/431457
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6a6b09c9
|
2017-01-12T21:52:29
|
|
Revert "Replace gl::trace logging with Chromium style logging"
Failing Chromium static initializers check:
FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower
Possibly due to the static initializer for std::array for
the log severity types. We should change it to POD.
BUG=angleproject:1660
This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4.
Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3
Reviewed-on: https://chromium-review.googlesource.com/427235
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
afcc41ce
|
2016-12-13T12:59:39
|
|
Replace gl::trace logging with Chromium style logging
Removing one usage of FormatString() and its static buffer.
And preparation for Platform logging.
BUG=angleproject:1660
Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210
Reviewed-on: https://chromium-review.googlesource.com/424173
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
7b8f3c9b
|
2016-11-10T10:42:48
|
|
Encapsulate the thread local storage into an egl::Thread class.
Instead of having separate GetGlobal* functions, interact with the global
objects through a single Thread object. This reduces the number of TLS
lookups in many EGL functions and allows the Thread object to be passed
down to other objects if needed.
BUG=angleproject:1618
Change-Id: I1f9a89e8899d637633f4e91fda0e38ac308dd020
Reviewed-on: https://chromium-review.googlesource.com/409637
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
437fa654
|
2016-05-03T15:13:24
|
|
Add a ContextImpl class.
This class can contain impl-specific functionality for a Context.
This will eventually replace the Renderer class, and we can then
start passing around a gl::Context instead of gl::ContextState.
In D3D11, the ContextImpl could hold a DeferredContext, which would
enable multi-thread rendering. In GL, we can implement non-virtual
(native) Contexts. In Vulkan it might store the logical device.
BUG=angleproject:1363
Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec
Reviewed-on: https://chromium-review.googlesource.com/340745
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f3586994
|
2015-10-14T18:27:07
|
|
angle: move DeallocateCurrent into windows only code
DeallocateCurrent is only called from within DllMain, which means
it's only called on windows.
On the mac, the warning unused-function may be triggered.
Move DeallocateCurrent to windows only code.
Change-Id: I61ba602af78d546a91cf009ae7350cf03eaa84dd
Reviewed-on: https://chromium-review.googlesource.com/305880
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
e7c6e43c
|
2014-12-03T14:48:07
|
|
Implement all entry points in libGLES and have libEGL act as a shim.
This allows libANGLE to only be included in libGLESv2 and moves all TLS
data to libGLESv2.dll.
BUG=angle:733
Change-Id: I34f0b47987a5efbe906c290d3ca656142e69ea9a
Reviewed-on: https://chromium-review.googlesource.com/232962
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|