src/libGLESv2/cl_stubs.cpp


Log

Author Commit Date CI Message
Gowtham Tammana ef6a3132 2024-06-25T17:30:03 CL: Return error code for not supported APIs The spec requires error codes to be reported for not supported API calls. Fixing to return relevant error codes. Bug: angleproject:359296611 Change-Id: Ia64bf2673446269c6557308c169f019c7dd67cc8 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5782397 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Annestrand 35c7e186 2024-04-03T14:31:59 CL: Introduce NDRange object/ops abstraction Create new FrontEnd type "NDRange" to encapsulate OpenCL's NDRange items. Update backend implementations to make use of this new object. Bug: angleproject:8650 Change-Id: I3c1549c50c85153b3ea77267e104eec04ba1bd93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5421572 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Annestrand f8c06f10 2023-11-30T17:45:35 OpenCL: Add types to cl_mem origin and region Now using cl::MemOffset and cl::Coordinate. Bug: angleproject:8439 Change-Id: Id775fe78467d3b56d2a7cc87f793221ab5e04bc5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5078244 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> 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>
Austin Annestrand ed7c31c7 2023-11-29T18:31:43 OpenCL: Replace error-passing APIs to use angle::Result Part 2 of Issue 8435: This part replaces existing error handling for all CL APIs that return CL objects to now use "angle::Result". Bug: angleproject:8435 Change-Id: I75e41c7cbb06220cabec7cc9f9cb5107a3b6bd6d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5075773 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Annestrand a9512a9f 2023-11-29T14:56:29 OpenCL: Replace error-return APIs to use angle::Result The motivation of converting existing CL APIs using "cl_int errorCode" to now use "angle::Result" is for better interop with internal ANGLE plumbing/abstractions. To facilitate this, we now make use of a TLS errorCode object that we set internally and read from entrypoint/stubs layer so that we can propagate back to user. Bug: angleproject:8435 Change-Id: I7c2a786019c33c56649be4b6e8b61bc318497bb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5075772 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
John Plate 2c8d9a9a 2021-06-09T16:09:35 CL: Remaining functions for OpenCL 1.2 Add support for the remaining functions for OpenCL 1.2 for the front end and pass-through back end. Also fix several bugs discovered by the conformance tests. Bug: angleproject:6015 Change-Id: I1dca1c3f4c1d9aea7f0501094c171116ea01381f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954259 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 55df3ec1 2021-06-08T18:57:15 CL: Add remaining enqueue commands Add support for remaining OpenCL 1.2 enqueue commands to front end and pass-through back end. Bug: angleproject:6015 Change-Id: Iab650e42d51e2105dc826088d3606c56d5cd0fd5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2944966 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 82654e5d 2021-06-06T15:46:53 CL: Add program build commands Add program build commands to front end and pass-through back end. Bug: angleproject:6015 Change-Id: I1175646d35ff050796b718d7f0e269520292b319 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940839 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 2e772e04 2021-06-04T14:01:42 CL: Add image enqueue commands Add image enqueue commands to front end and pass-through back end. Bug: angleproject:6015 Change-Id: I133e84020975679fafd29432c965cd19f086d2b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940837 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Plate <jplate@google.com>
John Plate 41b817f3 2021-05-31T17:38:43 CL: Add buffer enqueue commands Add buffer enqueue commands to front end and pass-through back end. Bug: angleproject:6015 Change-Id: I936530d31903e395550e4540339ebec2e6702e65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2928425 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
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 076974a9 2021-05-28T11:44:54 CL: event creation for front end & passthrough Add event object to back end and implement creation and info query. Bug: angleproject:6001 Change-Id: Id4951b726b66afa289fafe1a716a7cfdb6f5826d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2925477 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 9459456b 2021-05-27T13:43:41 CL: kernel creation for front end & passthrough Add kernel object to back end and implement creation and info query. Bug: angleproject:6001 Change-Id: I6e3fdd2b35d7e73ed56144dc938bf21436d3559f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2922150 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 1aa88398 2021-05-24T14:19:05 CL: program object creation for front end and pass-through Add program object to back end and implement creation and info query. Bug: angleproject:6001 Change-Id: If94db8ab8b491e1ac21c767347cabb6f4f3b3cba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate e3dd7161 2021-05-24T12:47:38 CL: sampler object creation for front end and pass-through Add sampler object to back end and implement creation and info query. Bug: angleproject:6001 Change-Id: If5b7d09564d773d6aeda7612728e19bfec7f6155 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912806 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate a6210a8f 2021-05-23T19:02:46 CL: image object creation for front end and pass-through Add image object to front end and implement creation and info query. Cache more Device info for Image validation. Bug: angleproject:5956 Change-Id: I38374f4c2c85287109c464ac90eb1bf49b07fa0a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912805 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate efd8da4d 2021-05-21T15:39:11 CL: buffer object creation for front end and pass-through Add Buffer object to front end and Memory object to back end. Implement creation of buffer and sub-buffer objects. Make cl::Object destructor virtual to support destruction of Buffer. Cache more Device info for Buffer validation. Add missing and move existing version checks into validation. Bug: angleproject:5956 Change-Id: Iea7665be5f6bdd8469e81f5fe4935a9fb0e03436 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912677 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 6622d2b4 2021-05-18T21:26:39 CL: command queues for front end and pass-through Bug: angleproject:5956 Change-Id: I6d9d4e4e7dfc5402408e3b002e66e4eae752967d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2903091 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 48b835cf 2021-05-09T22:47:00 CL: Implement context for front end and passthrough Bug: angleproject:5904 Change-Id: I23b764bba87be3a51a1b5b44b13968fc572efde9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2883773 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@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 93aff937 2021-05-08T16:46:22 Refactor CL platform object Move GetPlatformInfo implementation from stubs to cl::Platform, because stubs are meant to be small. Also move CLPlatformImpl::Info instance to cl::Platform as it is more efficient to be accessed from there, and more consistent with cl::Device. Bug: angleproject:5904 Change-Id: I4c0ba6390467d6ef357e38a5ef08f54b0a88d423 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880663 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate e369a282 2021-05-08T14:08:28 Implement CL device object for front end and passthrough Bug: angleproject:5904 Change-Id: I17f6d10ed59c62fe9126d29b7de2c127c5d0039a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880662 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Plate <jplate@google.com>
John Plate dc92d881 2021-05-04T09:56:50 Add warning messages for not (yet) supported CL commands Bug: angleproject:5904 Change-Id: I24e6a4d5cf4cc824751ff45e962bee16489fdbdd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2871450 Commit-Queue: John Plate <jplate@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 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>