scripts/generate_entry_points.py


Log

Author Commit Date CI Message
Shahbaz Youssefi 4167a9a0 2024-08-29T23:38:05 Don't lock the context mutex if no flush in eglClientWaitSync Bug: b/362604439 Change-Id: Ic514bcb3824514b5fd82ebb14ab97286aeb6557c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5828262 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang fcf3a1c0 2024-07-02T16:33:28 GL: Allow shader compilation with cached translated source Write the translated shader source when serializing shaders. This does not increase the size of the shader cache because Vulkan only uses the compiledBinary field. Spawn a ShaderTranslateTask for loading shaders so the GL backend can compile the shader on the native driver. Bug: angleproject:350779978 Change-Id: I14413a7ca2a0d99653a1082f2c8b4a94cf58626a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5672740 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 147ba459 2024-05-30T00:00:00 Allow polygonMode* commands with active PLS Drive-by: * Test that polygonOffsetClampEXT is allowed when PLS is active. Fixed: angleproject:345253437 Change-Id: I5d9f60b3e70eaf8da19017a8b9d6c2592cb4f4f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601849 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 6968848e 2024-05-30T00:00:00 Remove PLS checks from GLES 1.x entry points Fixed: angleproject:345125742 Change-Id: If845ddb654221cfb88c3f69bb98e07dbee8b6b39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5598770 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov c8db5292 2024-05-31T19:35:32 Remove locks from most glUniform* calls Note: only the Vulkan backend claims to be thread safe. glUniform1i and glUniform1iv are kept locked as they might set samplers, which is more complicated. glUniformBlockBinding is a more complex state change with notifications. Other glUniform functions simply call setUniformImpl() or setUniformMatrixfv() in the vulkan backend, which as https://crrev.com/c/5588853 and https://crrev.com/c/5592968 show only update mDefaultUniformBlocks and mDefaultUniformBlocksDirty. This should be thread-safe as long as the application is not creating race conditions itself such as by changing the same object in parallel. This should yield a significant improvement in the driver_overhead_2 benchmark which is heavy on such calls. Bug: angleproject:8666 Bug: b/335295728 Change-Id: Iad1577b9ab2eb57b6a4599ec6d70fa90eb518e8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588385 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 0e892a02 2024-05-30T14:07:47 EGL: Move egl surface timing calls into tail calls. eglGetCompositorTimingANDROID and eglGetFrameTimestampsANDROID can both take a lot of driver time to execute proportional to ANGLE's overhead. Bug: angleproject:42266858 Change-Id: I9b991f74a261b45aeb2aaf133fca7d22cabc41f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5580877 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi f4140c76 2024-05-10T16:56:13 Remove share group lock from glBindBuffer This is a very hot function. Removing the share group lock from this function improves the driver_overhead_2 execution time by ~1ms on Pixel 6. Bug: angleproject:8667 Change-Id: I9ea04f48aa1d2d0efec21407374393e88a1316e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5533081 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang a70ef7fc 2024-04-25T14:19:50 Add EGL_ANGLE_no_error for disabling EGL validation. Chrome makes many small EGL calls that can have proportionally expensive validation. Bug: angleproject:8434 Change-Id: I4f4d0e6eff64839f76a0f7bf48e5c94b8df9d809 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5491459 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 071e1e83 2024-05-08T10:33:49 EGL: eglCreateSyncKHR uses a return value for the tail call eglCreateSyncKHR was duplicated in two lists for using a tail call and needing a return value tail call. Bug: angleproject:8434, chromium:338902974 Change-Id: I9dffeaec3468e4ea3f5ed7d885e9ef418e8d8da5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5525854 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 038ad6c7 2024-04-23T13:23:04 EGL: Use unlocked tail calls for surface, sync and img calls EGL surface and sync calls can be expensive to do while holding the global lock on EGL. They are safe because the parameters are captured by value and the underlying EGL driver is also thread safe. EGL image creation also tends to be expensive and is called freqently by Chrome. Bug: angleproject:8434 Change-Id: I7e554fe2e3700d98469de267f7bbff1e96358c78 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5478229 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 884dc380 2024-04-24T16:46:01 EGL: Make eglGetCurrent(Context|Surface|Display) lockless. These functions access only egl::Thread state. Bug: angleproject:8434 Change-Id: I3dd6cd1f4fd145613f0be824e4f6e13815422997 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5485526 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 318e5e02 2024-03-24T08:17:56 Vulkan: Update EGL_EXT_buffer_age implementation 1. Buffer age is always 1 when swap behavior is EGL_BUFFER_PRESERVED. 2. WindowSurfaceVk::getBufferAge no longer acquires a swapchain image. See commit: b46cf6989f6fe8db5f0759001f633681a96fadde 3. It is valid to pass attributes of eglQuerySurface API to eglQuerySurface64KHR API 4. Add deadlock fix to eglQuerySurface64KHR Bug: angleproject:3529 Bug: angleproject:6851 Tests: EGLLockSurface3Test.QuerySurfaceAndQuerySurface64Parity* Tests: EGLBufferAgeTest.QueryBufferAge* Change-Id: Idf3c4fc08364f671fb02e99111be2beb7a1d9f3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5389461 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Annestrand 82ba79ff 2024-01-08T15:22:59 OpenCL: Update CLtypes.h to cl_types.h This change/enhancement is to keep codebase more consistent since vulkan backend versions of this header use lowercase-snake_case for file name. Bug: angleproject:8501 Change-Id: I223712c72db06425d192ddfe7300e5475c341e38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5233364 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya c2ad86bc 2024-01-09T15:39:26 eglGetError is now a lockless entrypoint eglGetError returns last recorded error in a thread, there is no need to lock the global mutex. Bug: b/318921454 Change-Id: I9e5192becc67dc81b54abfb63d2b32283ebc69d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5181881 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Annestrand c1aaa313 2023-11-29T18:54:06 OpenCL: Updated autogen script for updated CL error handling Part 3 of Issue 8435: Updated entrypoint autogen script for CL to: - Remove errorCode param for all CL APIs returning CL objects - Init CL error TLS object for all CL APIs prior to calling ANGLE FE Bug: angleproject:8435 Change-Id: I4f1784c0bda393d5f3126f205f17ec24662424ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5075774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b46cf698 2023-11-30T11:00:18 Vulkan: Fix Android deadlock with querying buffer age Similar to eglSwapBuffers, eglQuerySurface with EGL_BUFFER_AGE_EXT can cause a call to vkAcquireNextImageKHR. Bug: angleproject:6851 Bug: b/313975825 Change-Id: If3f0521219cab9aba2aeb2b70958bf0f197bc96a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5077406 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ade3dacd 2023-11-06T21:56:41 Do compile/link unlocked if not threaded (but thread-safe) If GL_KHR_parallel_shader_compile is not supported, or it is not used to do threaded compilation and link, this change lets the compile and link jobs be done after releasing the share group lock. With multithreaded/multi-context applications, this allows the other context (typically the main context) to make progress in the meantime. A typical scenario where this optimization matters is games seamlessly loading a new area of the game and performing compilation and link in a separate context. Before this change, the game would stutter as the compile/link jobs prevent the main thread from drawing anything. With this change, the hitching is removed. Bug: angleproject:8297 Change-Id: I702d84324a7442561b49677bf42c16d650304313 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5006640 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5149d210 2023-10-02T22:27:11 Vulkan: Deduplicate sync's clientWait logic As a side effect, both GL_NV_fence's client wait and external fence client wait is also done in an unlocked tail call. Bug: angleproject:8340 Change-Id: Ia0b882cc67ecf7ac5b2a8f9dc9e721060cca3c9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908351 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d919870f 2023-09-14T16:00:07 Vulkan: Do host image copy without holding the share group lock When an application uploads texture data such as with `glTexSubImage2D`, the share group lock is being hold while the data is being copied. Without VK_EXT_host_image_copy, this is a copy to a staging buffer, which may itself be expensive. With VK_EXT_host_image_copy, the cost of the copy is higher and so the lock would be held for a longer duration. This is particularly harmful to applications that spawn a separate thread for texture uploads (as the main thread is unable to make GL calls). This change moves the actual copy call to the tail of the call after the share group lock has been released. As a result: - The upload thread may be a bit slower, but - The copy does not interfere with the main thread, and - The copy does not interfere with the GPU's rendering work. As a result, games that load content seamlessly during gameplay should experience less stutter during texture uploads. Bug: angleproject:8341 Change-Id: I818c4389d4bf828847578da89414623e4b5e844e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864290 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 4b724130 2023-06-27T18:08:27 Rename SharedContexMutex into ContexMutex Follow up after: Replace (Single/Shared)ContextMutex classed with ContextMutex Renamed build option: angle_enable_shared_context_mutex -> angle_enable_context_mutex Renamed because there is no more SharedContexMutex class and ContextMutex is now used for both Shared and not Shared Contexts. Bug: angleproject:8226 Change-Id: I68eea84aa59441d9c5b19870910b2bb499311e08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4650350 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Mohan Maiya ce263437 2023-09-11T12:25:28 Vulkan: Perform CPU wait in clientWait outside the global lock Leverage UnlockedTailCall and move the CPU side wait during a clientWait outside of the global mutex lock. Bug: angleproject:8340 Tests: FenceSyncTest.BasicOperations* Tests: EGLSyncTest.EglClientWaitSync* Change-Id: I8c05e62e74cc64d38bf8797d28faaf49135e71fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851649 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Mohan Maiya 9740b01b 2023-09-08T16:30:08 Enhance UnlockedTailCall run method UnlockedTailCall::CallType is now std::function<void(void *)> This is in preparation for upcoming changes where unlocked tail calls need access to objects outside block and namespace scope. Bug: angleproject:8340 Tests: UnlockedTailCall* Change-Id: Ida6822b701c5c11ce4b8f6e3aae53108755e2cad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852021 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi 74cf6a3a 2023-07-12T14:44:17 Ensure lockless entry point validations only access private data Bug: angleproject:8224 Change-Id: I19e867923b088879f9f37d0a3b4ff8b681470be0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678352 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 9962f078 2023-07-11T15:39:50 Pass only context-private state to private entry points This change ensures that the implementation for these entry points cannot access anything other than context-private state. Bug: angleproject:8224 Change-Id: I988672b138d861db25e91d71ab8c34baa4e8ebee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678783 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 40111c68 2023-07-11T14:21:21 Rename context-local to context-private state Bug: angleproject:8224 Change-Id: I1bb39475043f8fb14d683d11a038b4850692a8c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678781 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 04c0cc8d 2023-07-06T21:58:06 Simplify aliasing-exception logic in entry point generation Bug: angleproject:8224 Change-Id: Ic54c233ab3d8a0f9a1ac803804aea770c6f7cc07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4672145 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 51320fab 2023-07-06T16:01:58 Make most GLES1 entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: I80223340348d62a56109324ab3e4f935e53419b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4670407 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi eb205e68 2023-07-06T13:34:28 Make the glPatchParameteri entry point lockless This entry points only sets context-local state and thus doesn't require locking. Bug: angleproject:8224 Change-Id: I17975a97aa7f68c3ddf2ef78069b8f519fdc4c1a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4670405 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Shahbaz Youssefi 7e0fb7e4 2023-07-05T17:20:23 Make glIsEnabled* entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: I6fe40bf4381e1d42248358f773ec9d5675883ada Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4666356 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 72c26926 2023-07-05T16:31:23 Make pack/unpack and hint entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: I5694d319df61a7a9df1766cf1f723b9a05208209 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4666352 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 208dfe28 2023-07-05T15:18:57 Make glStencil* entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: I612d8219ba038464173490b2c261e9e7b229c83f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661702 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c3c2f450 2023-07-05T14:52:10 Make glBlend* entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: Ie811c35ae7b65106db9af9f7531ad3a5e0bd4f8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661701 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 44395930 2023-07-05T11:59:23 Make various state setting entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: I428c23cc862e9356d571bc085b5df0bf48017175 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661700 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 9daac2b7 2023-07-05T11:36:46 Make glEnable/Disable entry points lockless These entry points only set context-local state and thus don't require locking. Bug: angleproject:8224 Change-Id: Id4eab729115bd75f82e1ec7a27355c821a7c4320 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661697 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi be41fe29 2023-07-04T15:35:46 Make glColor/DepthMask entry points lockless These entry points only set state that is entirely accessed by the owning context (context-local) and thus don't require locking. glColorMask* functions also affect the cached context state (in particular draw validity), so the relevant cached state is also modified to support being locklessly modified. Bug: angleproject:8224 Change-Id: I221b4efa25fc1c11419d1ac942f1c37e59ec92c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4658173 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4db13081 2023-07-04T14:40:31 Make glClearColor/Depth/Stencil entry points lockless These entry points only set state that is entirely accessed by the owning context and thus don't require locking. Bug: angleproject:8224 Change-Id: I6cddee865ffd38e228f8f87dd14adffb916e0fed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4658172 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 36c3e0f5 2023-01-17T17:42:59 Implement "Shared Context Mutex" functionality. Existing implementation uses single `GlobalMutex` for - EGL calls - GL calls for Contexts with concurrent access. This CL introduces abstract `egl::ContextMutex` with two implementations: - SingleContextMutex; - SharedContextMutex<Mutex>; Note: `std::mutex` is used in this commit. It is very easy to change mutex type either at compile-time or at run-time (single type per Display). When Context: - is not Shared; - does not use `EGLImage`s; - does not use EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE - does not use EGL_DISPLAY_SEMAPHORE_SHARE_GROUP_ANGLE then it will be using `SingleContextMutex` with minimal overhead. Before such Context is used as `shareContext` or uses `EGLImage` its mutex replaced by `SharedContextMutex<Mutex>`. The `GlobalMutex` is only used for EGL calls, while `egl::ContextMutex` implementations for GL calls. Because some EGL calls use Context, explicit `egl::ContextMutex` lock is required. This is implemented by generating "egl_context_mutex_autogen.h" header, and insertion of `ANGLE_EGL_SCOPED_CONTEXT_LOCK()` macro before `ANGLE_EGL_VALIDATE()` in each EGL entry point. Implementation in "egl_context_lock_impl.h" returns lock for required APIs. Special cases of `egl::ContextMutex` lock handled separately. `std::unique_lock<>` is not used for performance reasons. `egl::ContextMutex` explicitly locked when capturing EGL calls. Fixes EGLImage problem: https://chromium.googlesource.com/angle/angle/+/e18240d136d15e5cdfa4fa4a6355ca21c8d807b6 Mark contexts as shared when importing EGL images. Details: - EGLImage inherits Context's mutex when created. Mutex is used when the EGLImage accessed or destroyed. - When EGLImage is used in Context with other `egl::ContextMutex`, two mutexes are merged into one. - After the mutex merge, Context Groups will remain separate, but will not be able to run in parallel. Fixes race when checking `context->isShared()` in the `SCOPED_SHARE_CONTEXT_LOCK()` macro. One Context may start executing GL call while not "Shared", but become "Shared" inside the call. New (second) "Shared" Context may immediately start using GL and potentially corrupt some "Shared" state. Possible performance benefit: allows parallel execution in some cases, when single `GlobalMutex` would block. Important note: Process of replacing the `SingleContextMutex` by `SharedContextMutex<Mutex>` is not 100% safe. This mean that original Context may still be using `SingleContextMutex` after activating `SharedContextMutex<Mutex>`. However, this was always the case before introduction of this CL. Old `Context::mShared` member update was not synchronized in any way at all. In other words, this solution does not 100% fix the original problem. For 100% safe solution `SingleContextMutex` should not be used (always pass `SharedContextMutex<Mutex>` to the `gl::Context` constructor). See `lockAndActivateSharedContextMutex()` for more details. CL adds new build option: angle_enable_shared_context_mutex = true Behavior with other build options: - When: `angle_enable_shared_context_mutex` is disabled or `angle_enable_share_context_lock` is disabled or `angle_force_context_check_every_call` is enabled, Contexts will always have `SingleContextMutex`, however it will be only used in special cases. `SCOPED_SHARE_CONTEXT_LOCK()` will use `GlobalMutex` when applicable. - Otherwise, `SCOPED_SHARE_CONTEXT_LOCK()` will use `egl::ContextMutex`. Some GFXBench "1080p Driver Overhead 2 Offscreen" performance numbers. Tested on S906B (Samsung Galaxy S22+) on old ANGLE base: https://chromium.googlesource.com/angle/angle/+/807c94ea85e046c6f279d081d99f0fb1bcf1191a Capture/Replay: Adjust tests do adhere to capture limits Each test result is an average frame number from 6 runs. SingleContextMutex 6579 ( +0.13%) (old) GetContextLock() (mShared is false) 6570 Forced `mShared = true` or NOT using `SingleContextMutex`. SharedContextMutex<std::mutex> FORCE 5061 (-22.97%) (old) GetContextLock() FORCE 4766 (-27.46%) Bug: angleproject:6957 Bug: chromium:1336126 Change-Id: Idcd919f9d4bf482b9ae489bd8b4415ec96048e32 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374545 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 7d4c6d1d 2023-05-09T12:19:54 Allow glDelete* while PLS is active Banning glDelete* is extremely dangerous. It will almost definitely cause memory leaks in client code, and it makes JS garbage collection needlessly complex. Instead, specify that PLS is implicity deactivated if the client deletes anything that is attached to the current draw framebuffer during a PLS rendering pass. Bug: chromium:1421437 Change-Id: I3a18ee6b5d5567431e6fa3eccea58cb049845502 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4521436 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi 7fd01d03 2023-04-19T00:54:24 Vulkan: Throttle the CPU without holding the global lock CPU throttling goes through CommandQueue and is thread-safe. Performing it in an unlocked tail call allows other unrelated EGL calls to go through. Bug: angleproject:8135 Change-Id: Idb3841be5d8ea8c4b76217f6707be26b28ea39c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4444027 Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi cd6a58f2 2023-04-18T12:45:10 Vulkan: Make eglPrepareSwapBuffersANGLE less special This function now uses the UnlockedTailCall mechanism so it doesn't require as much special-case code generation. This change does not fix the bug that this function is doing too much work without holding any locks. That will be done in a follow up. Bug: angleproject:6851 Bug: angleproject:8133 Change-Id: I77f4d514ff4aeef85bc1cc59214f7caa23aca7df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4443186 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1328f2f3 2023-04-17T16:43:12 Vulkan: Destroy the surface without holding the EGL lock This change defers surface destruction to the end of the entry point that causes it so that it is done without holding the EGL lock. This works around a specific deadlock in Android. On this platform: - For EGL applications, parts of surface creation and destruction are handled by the platform, and parts of it are done by the native EGL driver. Namely, on surface destruction, native_window_api_disconnect is called outside the EGL driver. - For Vulkan applications, vkDestroySurfaceKHR takes full responsibility for destroying the surface, including calling native_window_api_disconnect. Unfortunately, native_window_api_disconnect may use EGL sync objects and can lead to calling into the EGL driver. For ANGLE, this is particularly problematic because it is simultaneously a Vulkan application and the EGL driver, causing `vkDestroySurfaceKHR` to call back into ANGLE and attempt to reacquire the EGL lock. Since there are no users of the surface when calling vkDestroySurfaceKHR, it is safe for ANGLE to destroy it without holding the EGL lock. Note that only eglDestroySurface and eglMakeCurrent may lead to the destruction of a window surface. Bug: b/275176234 Bug: angleproject:8127 Change-Id: I02dc52e53e150943457e3f503e7ef30469f96b05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4428754 Reviewed-by: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov e2baaff8 2023-04-06T00:11:23 Prevent recursive GlobalMutex locking by ANGLE itself. Instead of adding `ANGLE_SCOPED_GLOBAL_LOCK()` for `glEGLImage*` GLES APIs, this CL uses new `SCOPED_GLOBAL_AND_SHARE_CONTEXT_LOCK()` macro in place of `SCOPED_SHARE_CONTEXT_LOCK()`. This will remove dependency on recursive mutex for ANGLE itself. Recursive mutex is still required for Android Vulkan or in specific cases when using layer libraries. Bug: chromium:1383195 Change-Id: I0c379c45c046b0f5e5dd3ea64a45d33b0ad3ee43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404777 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Chris Dalton ef20f191 2023-03-29T14:05:04 Make the PLS allow list more permissive Allow ClipControlEXT, FlushMappedBufferRange, Gen*, PolygonOffset*, ProvokingVertexANGLE, and KHR_debug commands. Allow caps DEPTH_CLAMP_EXT, CLIP_DISTANCE[0..7]_EXT. Ban indexed caps besides BLEND, SCISSOR_TEST, SCISSOR_TEST_EXCLUSIVE_NV. Clarify that the index restrictions on indexed caps only apply to BLEND. Bug: chromium:1421437 Change-Id: Ibdb0acaebfa992ad37c928481d5ecb10496f22e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4382502 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi 3b57e999 2023-04-17T15:38:47 Scope global lock in entry points This change is a no-op. It's in preparation for adding calls at the end of the entry point after the lock is unlocked. Bug: angleproject:8127 Change-Id: I4cd79ff8e5f20f87f36040afbd1ed9f16406d519 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4436589 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Igor Nazarov be3d7e6b 2023-03-30T14:35:18 Remove redundant g_SurfaceMutex. This mutex become redundant after recent CL: https://chromium.googlesource.com/angle/angle/+/23ad4fa2be35aed303cbb8c2d632a04714354ef0 Don't hold global surface lock during AcquireNextImage Every place in the code where `ANGLE_SCOPED_GLOBAL_SURFACE_LOCK()` is used also uses `ANGLE_SCOPED_GLOBAL_LOCK()`. Bug: angleproject:6851 Change-Id: I464b6ca74743c9ee9fa23caad216f0e26c480655 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4385293 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Chris Dalton a491bbe3 2023-03-18T19:05:08 Add PLS utilities for interrupting a rendering pass Adds two more simple commands to ANGLE_shader_pixel_local_storage that allow WebGL and the command buffer to interrupt rendering passes without having to either (1) make expensive queries, or (2) track lots of complex state for validation that they are not currently equipped to track. Bug: chromium:1421437 Change-Id: I80eaef3ae6b0b4bbbecb9cd2268ac90b43675d1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355032 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Yuly Novikov cba2a0d5 2023-02-16T19:48:30 Keep MemoryBarrier macro defined Macro was originally undefined in crrev.com/c/361291. Undefining it breaks UWP build with newer compilers. Keeping the macro defined doesn't affect libGLESv2 exported symbols, so it looks like there is no need to undefine it. Bug: chromium:1380553 Change-Id: I6476aa015949e5f2639160fac80db39da710bfb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4262071 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Vigil 278b5d02 2023-02-17T10:39:40 EGL: Enable wayland types with autogen Types with "wl_" indicate wayland types, use as is. Bug: angleproject:8027 Change-Id: If3c5d062272038c3a8773796a233af2305f3ed98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4265015 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny a52c0a6c 2023-02-06T16:01:27 Capture/Replay: Add and handle new resource type for EGLSync So far calls involving EGLSync were not tracking the actual sync objects, and this may lead to race conditions in multi-threaded and multi-context scenarios. This CL adds the type EGLSyncID and some specialized code handling of egl::Sync to distinguish EGLSync from the already existing GLSync objects in order to track them separately. Bug: angleproject:7911 Change-Id: I91b188a41069bc0620f51c55ee516d23b55bdd38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4200095 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill f7b5d5d1 2022-12-15T10:52:07 Capture/Replay: Remove inline variable declarations. This makes parsing easier for the "simplified C" interpreter. We introduce a resource ID buffer as a way to manage a list of resource IDs to replace the inline resource lists. Turns on the Among Us trace in the interpreter tests. Bug: angleproject:7775 Change-Id: I1bb9c0e9b087965a18691bc99b2e9947610b9eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128719 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fdada9ee 2022-12-13T14:52:53 Re-land: "Make SyncIDs a packed type." This re-land fixes the sync map size tracking. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: If2114c51d5b68503890eacbf549182823667fedc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178012 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8971a592 2023-01-18T14:35:09 Revert "Make SyncIDs a packed type." This reverts commit 9de913077a5fcc3d2f2e327b56bbe30efe2fde96. Reason for revert: Fails win-trace, somewhat flakily. Original change's description: > Make SyncIDs a packed type. > > This prepares syncs to use a simple resource map like other > types, which will make life easier in the trace interpreter. > > Bug: angleproject:7775 > Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:7775 Change-Id: I29534b14c973fa34a4cb7457d534cd6156f33cd2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178010 Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 9de91307 2022-12-13T14:52:53 Make SyncIDs a packed type. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill aaee3c23 2022-11-30T14:24:13 Build and test ANGLE with Vulkan secondary CBs. This will allow us to run tests with both permutations of ANGLE (custom secondaries & Vulkan secondaries) in the same build directory. It will also allow us to run these configs as tests on our infra. This CL adds a few simple test to CI. Bug: angleproject:6811 Change-Id: I053f8cc5bafc2a7ab7d0665da9301f0ba7f8417f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4067806 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peng Huang 2805e164 2022-11-29T15:16:42 Fix EGLImage related race condition crash Bug: chromium:1383195 Change-Id: Ibd74126f19674dad9425d2c8f5b3a217cfd590e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4062912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Chris Dalton 9f693aa3 2022-10-22T14:45:59 Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Jamie Madill dc62b3ee 2022-10-10T21:00:16 Capture/Replay: Add trace interpreter. Also adds a self-test using the retrace script. Bug: angleproject:7752 Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 6193274a 2022-10-10T21:00:12 Capture/Replay: Redesign in-memory call capture replay. This will allow the replay to use the call captures returned by the interpreter's parser. Bug: angleproject:7752 Change-Id: If1b281d9ce7ccfbdc23bea615e1e2258c8a029f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963367 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill fd45cec3 2022-10-10T20:59:58 Entry Points: Move enum helper to registry_xml. This will make it accessible to other generators. Bug: angleproject:7752 Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 Capture/Replay: Move shared trace code into src/common. This will let them be accessible to the test harnesses. The trace tests interpreter will need direct access to the classes that we move in this CL. This CL also moves the GLenum utils into the common folder, where they were already used by some other tests. Bug: angleproject:7752 Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 2265e37b 2022-10-12T09:27:16 Capture/Replay: Auto-generate EGL capture code. Replaces the custom code in the EGL stubs. Skips a few "Get" entry points because this CL doesn't implement pointer capture like we do for all the GL entry points. Includes a new state in the AttributeMap that indicates which type of attribute values we used when initializing the map. Bug: angleproject:4035 Change-Id: I272eac5e4068602ce710ef66c9a1dce5387943a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949911 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 7c4dc253 2022-10-12T08:38:46 Capture/Replay: Clean up EGL capture. This switches the EGL capture types to ANGLE-casted pointers since that's what we receive in the capture layer. Note that even if the capture layer were used as a pure layer, not an EGL implementation, we'd still have these types for state tracking. This also prefixes each EGL class in the entry points with the egl namespace for consistency and for simplifying the ParamType code. Required changing to non-const gl::Context * in a few places. Also changes the gSurfaceMap to be indexed by the raw pointer value, which cleans up the code somewhat. Bug: angleproject:4035 Change-Id: Id800c1ba25e5819ac7ea1df8aab806bc393fe192 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949910 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b3781ec 2022-10-03T16:09:35 Remove namespacing from all ANGLE loaders. This will make it easier to work with pure C files. Bug: angleproject:7731 Change-Id: I2fe9af486af5f339d973c9149f082eb1f2efa8c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3925426 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi de73f7cd 2022-09-14T22:27:28 Introduce GL_ANGLE_logic_op This extension exposes the desktop GL glLogicOp function as a GLES extension. This is supported by Vulkan through the logicOp feature as well. The goal is to directly use this extension in GLES1 emulation where the backend supports it, avoiding a more costly fallback. Bug: angleproject:3862 Change-Id: I7ed436cdf401437157ca9724168849b4c819b91b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898310 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Eddie Hatfield 3960e63b 2022-08-09T14:02:59 Infra: Enable angle_deqp_gl46_tests on SwiftShader This change disables the WGL frontend by default on Windows when building ANGLE for desktop GL. This is because the WGL frontend is not yet fully implemented and it causes some of the trace tests to fail. The WGL frontend should be enabled by default on windows when more of its functionality gets implemented. Test: angle_deqp_gl46_tests --use-angle=swiftshader Bug: angleproject:7566 Bug: angleproject:7628 Change-Id: I69c695eb56d3858f715eeb86d28cc805e25c60eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 64f41972 2022-08-25T11:16:23 Use canonical gl.xml and update enum to string function. This replaces our copy of gl.xml with the upstream canonical copy. Note that one patch is required before we can remove ANGLE's copy: https://github.com/KhronosGroup/OpenGL-Registry/pull/538 Because the upstream version uses a new method of enum groups, we also update our enum-to-string generator to use the new groups. This new code includes many more enums and groups in the mapping. Bug: angleproject:6461 Change-Id: I1c0ab44c36afce8db04c9661b377bbe5762c913e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856649 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Eddie Hatfield 98d5db70 2022-08-25T16:50:38 Add capture functions for desktop GL entry points The parameter capture functions are left unimplemented for now. Bug: angleproject:7533 Change-Id: Ief356e7401805cf9b417e1f5cc3790011237e03f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858618 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Eddie Hatfield d89c027e 2022-08-22T11:40:40 Add unimplemented GLX entry points to desktop GL Test: Run glxgears and hit unimplemented in ANGLE Bug: angleproject:7533 Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield c54ed790 2022-07-21T10:38:47 Get desktop GL conformance tests to build The target for these tests is angle_deqp_gl_tests. Bug: angleproject:7533 Change-Id: I290822671d99da020f9a6a1f02bee43987644bf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3766435 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Peng Huang b78d471a 2022-07-21T09:53:37 Add angle_enable_share_context_lock build flag This flags can be used to enable the share context lock. Without this lock, the client need to use gl calls in a threadsafe way. It is true by default. Bug: chromium:1336126 Change-Id: I984f8cfb0379195f6ebe11b0997e401f2421affa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780582 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Faye Zhang 06ff0e3c 2022-06-06T15:29:16 Implement GL_EXT_base_instance Added new extension GL_EXT_base_instance to registry_xml.py and auto-generated the entry point function calls for the following functions introduced by the extension: * GL_DrawElementsInstancedBaseVertexBaseInstanceEXT * GL_DrawElementsInstancedBaseInstanceEXT * GL_DrawArraysInstancedBaseInstanceEXT Bug: angleproject:6983 Change-Id: I36167faf3ca98e42acf787dbf09ee7052e15e358 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691952 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Faye Zhang <ffz@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Gert Wollny 66b9214f 2022-05-03T14:48:07 Capture/Replay: rename ANGLE_CAPTURE to ANGLE_CAPTURE_GL In addition gunning "git cl format" on the current tree resulted in additional changes. Bug: angleproject:4964 Change-Id: I3df4888aef763d06f91227409dbd943d0d25689e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634699 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 24c641dc 2022-03-01T11:12:38 Add stubs for AMD_performance_monitor. We can piggy-back on this extension to report internal ANGLE performance counters to the ANGLE tests. Includes a minor variable de-duplication in the EP generator. Bug: angleproject:4918 Change-Id: I4a76aea957b423a36a90349643bd50a4e1905849 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3497537 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d3ce72d 2022-01-20T10:13:06 Refactor shared library load to avoid allocations. Fixes a leak of an angle::Library detected in the EGL loader. Bug: angleproject:6937 Change-Id: I623aa6172b98a35465e1d2641b92f67bdc5d24e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3403060 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 926b43e7 2022-01-06T13:31:54 Reland: Frontend: separate lock in swap prep Swapchain-based backends like Vulkan might block a lot in vkAcquireNextImageKHR, which is bad for overall fast progress if we also hold the global EGL lock there. This CL starts to split the global EGL lock. We release the EGL lock when performing vkAcquireNextImageKHR, and only maintain a lock for surfaces. This is done via a new custom entry point, EGL_PrepareSwapBuffers, so that we can control how the global lock is used throughout the entire call. Bug: angleproject:6851 Change-Id: I095cd8b3bdbb13c842cab0a46148e2122582cdfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373426 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Jamie Madill 9d668d6c 2022-01-07T18:18:23 Revert "Frontend: separate lock in swap prep" This reverts commit 40c5cb255c0a07bdab574aa076ee603e7d791ab3. Reason for revert: Regression in TSAN caused by this CL: https://ci.chromium.org/ui/p/angle/builders/ci/linux-tsan-test/352/overview Original change's description: > Frontend: separate lock in swap prep > > Swapchain-based backends like Vulkan might block a lot in > vkAcquireNextImageKHR, which is bad for overall fast progress if we also > hold the global EGL lock there. > > This CL starts to split the global EGL lock. We release the EGL lock > when performing vkAcquireNextImageKHR, and only maintain a lock for > surfaces. > > Bug: angleproject:6851 > Change-Id: I329d5c4c579718a4980c4261590f77099ce1400e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3361249 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> Bug: angleproject:6851 Change-Id: Ie03b784021f7b8b5c1ef95a911ef7da4029abd46 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373165 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 40c5cb25 2022-01-06T13:31:54 Frontend: separate lock in swap prep Swapchain-based backends like Vulkan might block a lot in vkAcquireNextImageKHR, which is bad for overall fast progress if we also hold the global EGL lock there. This CL starts to split the global EGL lock. We release the EGL lock when performing vkAcquireNextImageKHR, and only maintain a lock for surfaces. Bug: angleproject:6851 Change-Id: I329d5c4c579718a4980c4261590f77099ce1400e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3361249 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Alexis Hetu cac81f07 2021-12-14T22:56:15 Return full error info when opening a library with dlopen This CL adds a parameter to OpenSharedLibrary and OpenSharedLibraryWithExtension which is used to return the full path of the library which was opened. If dlopen failed, the string also contains the result of dlerror which explains what the error was. Bug: chromium:1246171 Change-Id: I374c7e2dfa18853c8137b4cbea06af8db3fdb501 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3340020 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Alexis Hetu f7d92a32 2021-12-10T10:23:32 Add debug info when loading EGL entry points fails Mac11 bots are often failing with the: "Error loading EGL entry points" error for an unknown reason. This CL adds the library path to the error message to see if it's trying to open the correct file. Bug: chromium:1277690 Change-Id: Ieb73a3097702933a89794d92c19ee44a6301c169 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3330576 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Gert Wollny 8d51bd4b 2021-11-19T00:34:22 Capture/Replay: Add default return path for AccessParamValue Some versions of MSVC have a bug that it will not detect when all values of an enum are exhausted in a switch statement, which leads to a warning that not all code path return a value, and since the warning is treated as an error, compilation fails. Bug: angleproject:6721 Change-Id: I4d62191ce83a04ba554dd804f13e7d428afd86a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3291649 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Gert Wollny 8712495d 2021-10-05T11:56:32 Capture/Replay: Don't handle void pointers as const TL;DR: glReadPixels needs a non-const pointer if a pack buffer is bound, so change the code generation to keep TvoidPointer non-const and regenerate the entry points. Long version: When no pack buffer is bound, then in WriteCppReplayForCall param.readBufferSizeBytes is non-zero and the cast of the read buffer pointer is using the type passed by the parameter (TvoidPionter) to write the typecast by calling ParamTypeToString directly, which returns "void *". If. OTOH, a pack buffer is bound, then param.readBufferSizeBytes is zero, and the default WriteParamCaptureReplay is called. This autogenerated function forwards the call to WriteParamValueReplay by using an explicit type specification, and the autogeneration code was translating TvoidPointer to call WriteParamValueReplay<ParamType::TvoidConstPointer> which would then translate to "const void *" in the parameter type cast, and this would lead to a compilation failure, because the parameter must be a non-const pointer. Change the autogeneration code so that TvoidPointer is not forced to be a const pointer and regenerate the entry points. Bug: angleproject:6521 Change-Id: I673c77f803a284fb7dfc08a2e0918aebdf698194 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204959 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Jamie Madill ad286e71 2021-08-17T10:43:47 Capture/Replay: Clean up ResourceTracker access. This reduces the boilerplate needed to tracked genned/deleted resources. Refactoring change only. Bug: angleproject:5133 Change-Id: I81f8877b2c308fe9d4136999f3ca63371a070720 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3100591 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Tim Van Patten 62cac8b5 2021-08-06T18:24:52 Capture/Replay: Add EGL support to generate_entry_points.py Add EGL support to generate_entry_points.py. This is a pre-requisite to frame capture being able to generate EGL calls, which is required for multi-context support. Bug: angleproject:5878 Bug: angleproject:4035 Change-Id: I3b8e9c91f9e2820b5207fc02d858e8109921f581 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078993 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 232e5236 2021-07-08T15:08:35 Remove the explicit context extension. This extension currently has no known users and doubles the number of entry points that ANGLE exports which is a significant binary size cost. This saves about 130kb of binary size on Android. Bug: chromium:1084580 Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 223cd0ac 2021-06-15T18:46:07 Capture/Replay: Refactor shared context handling This is the initial CL to enable capture/replay of multi-context applications. This CL refactors FrameCapture and FrameCaptureShared to move much of the functionality into FrameCaptureShared, since most everything is shared by Contexts in the share group. For example, the setup of the majority of the GL objects is done in the new SetupReplayContextShared() function in the new $LABEL_capture_context_shared_frame001.cpp file. The setup is performed by (for example): void SetupReplay() { $LABEL::InitReplay(); $LABEL::SetupReplayContextShared(); SetupReplayContext2(); } This performs the shared setup first, followed by the context-specific setup, which may reference shared objects careated by LABEL::SetupReplayContextShared(). No re-capturing is required with this change, since the external APIs (i.e., SetupReplay()) are still the same. Bug: angleproject:5878 Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2 Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate baca10b7 2021-05-29T16:26:57 CL: Remove object cache and fix multi-threading All CL front end objects used to be cached to be able to determine if an object has been created by the front end to check its validity. The validity is now checked with the existence of an intrinsic value (the dispatch table pointer), which is consistent with the patterns found in Mesa and clvk (though clvk uses a magic value). This allows the removal of all cached objects. The cached objects were stored with std::unique_ptr. These are now gone and all remaining pointers are now custom intrinsic reference count pointers. Also remove global lock which causes deadlocks, e.g. when CL API is called from a separate thread to unlock a blocking call with a user event. Most of the front end is constant and already thread-safe. The ref count is also thread-safe now (atomic). A few remaining locks will follow. Without the global lock it was now possible to make the API reentrant, and to remove the workaround with the Khronos ICD loader to skip ANGLE's OpenCL library. Bug: angleproject:6001 Change-Id: I7d3b52db9011a02cb7ea9ebdeb6e22c4c702ef5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2927395 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 51ab3dc3 2021-05-25T16:54:11 CL: Improve validation readablity Improve validation readablity by introducing a bit field class and by changing how the CL error code is returned. Bug: angleproject:6001 Change-Id: I51deb745454e5281de725481edef85eb30be28c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2919690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate a7ae63e4 2021-05-14T21:55:52 CL: Move object cast from entry points to stubs and front end Move the OpenCl object cast from the generated entry points to the stubs and front end, to make it possible to properly use static_cast. This removes the limitation that the front end objects have to be standard layout (and makes it possible to use virtual functions), which is consistent with other front end objects. Move the back end initialization from the stubs to the entry point functions, which fixes a bug where the back ends were not initialized during validation. Move more code from the stubs to the front end, to keep the stubs light. Remove unused function `default_return_value` from `generate_entry_points.py`. Bug: angleproject:5904 Change-Id: Id999ad6c537888017bf3252c6f6e088b7d4c7984 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897245 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate b300dc52 2021-05-09T00:35:24 CL: device partitioning for front end and passthrough Partitioning is the creation of sub-devices. Also add reference counting for CL objects, which is needed now for sub-devices. Also fix CL print format strings, since cl_ulong is actually always 64 bit and not unsigned long. Bug: angleproject:5904 Change-Id: I006699fad2f953ce312bca87c9b6362b5d77a18a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880665 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate dfe208f1 2021-04-28T18:26:00 Add loader for CL pass-through back end Bug: angleproject:5904 Change-Id: If4960f3150f6bbc85a30f0f6ac5c9e668e6ff756 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2864022 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 05fb2272 2021-04-27T19:31:31 Add support for OpenCL ICD Loader Bug: angleproject:5908 Change-Id: Idafc0d15b69f9a21f2ab5e48c4c34f0dc0e0ee96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2854598 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate cddb2003 2021-04-23T18:26:51 Stubs for CL validation entry points Bug: angleproject:5775 Change-Id: Ic3b15efdf602bad8f5f170f03ba24b421a398ca8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2848504 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Plate <jplate@google.com>
John Plate e25f3b10 2021-04-21T21:43:46 Generate empty CL object classes Bug: angleproject:5886 Change-Id: I01566f40e85bd7f5531536fdc1df42965622a939 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2844969 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 8226dc23 2021-04-15T19:25:31 Generate CL enums in libGLESv2 Bug: angleproject:5869 Change-Id: Ie547d415bed37accef6cb62d28bc6b088a1eb810 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2829370 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 8994fc7b 2021-04-12T19:46:11 Migrate CL entry points to libGLESv2 Bug: angleproject:5759 Change-Id: I79644e7bda3ad0a15eb041b2805b8765c0d22029 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822258 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 1d7046ca 2021-04-12T16:17:22 Generate CL stubs in libGLESv2 Bug: angleproject:5758 Change-Id: I6440dacf0db57a56923d2cab5a7c791981ba3b9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822248 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Chris Forbes 84a62266 2021-04-01T15:18:44 Expand CL plumbing support to cover all versions The OpenCL CTS assumes that libOpenCL has symbols for all versions as it usually expects to link against the Khronos loader. Since we're not using that, we have to expose all the symbols it wants, whether we intend to implement all versions or not. All the 2.x stuff will likely remain stubs forever as it is made optional again in 3.0. In the generator scripts, work around a small issue where one function takes an array-typed parameter, which confused just_the_name and produced invalid code. Bug: angleproject:5819 Change-Id: I6c3591dc9229c5276f14ff66ee3ee6362e8bf622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807531 Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Plate <jplate@google.com>