src/libANGLE/renderer/cl/CLPlatformCL.cpp


Log

Author Commit Date CI Message
Jamie Madill d8c18ac6 2021-10-08T13:00:19 Re-land: "Isolate commit_id.h from other code." Re-land limits the angle_version deps to Windows to fix an iOS visibility rule violation in GN. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I033f00ec7afe4bfd01e29e0eea8848eea27747a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233899 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7defdb60 2021-10-19T14:07:07 Revert "Isolate commit_id.h from other code." This reverts commit 6d7ebf656d06f1152967aa5f4457d3787a24732c. Reason for revert: Suspected reason for failing ANGLE roll into Chromium Original change's description: > Isolate commit_id.h from other code. > > Instead of recompiling multiple source files, we can seal off the > files that include commit_id to prevent recompilations when the > commit changes and source files don't change. > > Bug: angleproject:2551 > Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: angleproject:2551 Bug: angleproject:6588 Change-Id: I19f41141f57d0683efb9a4ec043e078a9f7dc925 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226056 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 6d7ebf65 2021-10-08T13:00:19 Isolate commit_id.h from other code. Instead of recompiling multiple source files, we can seal off the files that include commit_id to prevent recompilations when the commit changes and source files don't change. Bug: angleproject:2551 Change-Id: I98800c5a8e04ec7d4c3e57ea0eb3b636d3b224bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212895 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
John Plate 1891af05 2021-06-16T10:20:32 CL: Refactor TRY macro and fix more conformance bugs Bug: angleproject:6015 Change-Id: Id54be19822fec2ac5584ffe1d1cf5bb8f00c9094 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967467 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 69562546 2021-06-11T19:12:11 CL: Refactor info structs and fix conformance bug - Remove variable name prefix from Info structs to be more consistent with other ANGLE structs. - Fix CL object validation check with magics, since the Mesa solution doesn't work without RTTI. - Add support for some extensions required by OpenCL 1.1 and for some optional extensions. - Fix more conformance bugs. Bug: angleproject:6015 Change-Id: I41b1c45d95059a9994f5dc78bf9b74476cc6f2d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2956349 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@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 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 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 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 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>
Jonah Ryan-Davis e2fc818a 2021-05-05T11:51:00 Reland Change to module directory when loading swiftshader ICD. This is a reland of commit 3b10dda6a479612a07673b5c87d3560e0941d41b. Extra changes: Be explicit about calling GetModuleHandleA Do not use the general GetModuleHandle, which may use wide strings Refactored ConcatenatePath and add tests GetModuleDirectory should return the full path, not relative. ANGLE wasn't able to locate the vulkan ICD file because it was searching down an invalid relative path. This can be fixed by ensuring the module directory is always the full path. on some platforms. Original change's description: > When loading vulkan, we can be running from any directory. We need > to change to the module directory to ensure the swiftshader ICD is > loaded properly. For example, in some Chrome releases, libGLESv2.dll > and libvk_swiftshader.dll are in a subdirectory relative to chrome.exe > > Bug: chromium:1198567 > Change-Id: I9e68927e512b239728fb2903d1a04702508a4948 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2873452 > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: chromium:1198567 Bug: angleproject:5949 Change-Id: I63fbe93f8492b7f23566f8193b1b8fe784a34f71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
John Plate 10a8182c 2021-05-19T21:00:05 CL: Fix querying default device if non exists Bug: angleproject:5992 Change-Id: Ie43f905fbb9cf41b0f6f88b2db27ebe9de9c37e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2906993 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@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>
Jonah Ryan-Davis ffb71dc2 2021-05-18T15:10:58 Revert "Reland Change to module directory when loading swiftshader ICD." This reverts commit c8c414b084fa3b6550b10dff48cf429719e04579. Reason for revert: Breaking fuchsia_x64 and ANGLE autoroller Original change's description: > Reland Change to module directory when loading swiftshader ICD. > > This is a reland of commit 3b10dda6a479612a07673b5c87d3560e0941d41b. > > Extra changes: > Be explicit about calling GetModuleHandleA > Do not use the general GetModuleHandle, which may use wide strings > > GetModuleDirectory should return the full path, not relative. > ANGLE wasn't able to locate the vulkan ICD file because it was > searching down an invalid relative path. This can be fixed by > ensuring the module directory is always the full path. > on some platforms. > > Original change's description: > > When loading vulkan, we can be running from any directory. We need > > to change to the module directory to ensure the swiftshader ICD is > > loaded properly. For example, in some Chrome releases, libGLESv2.dll > > and libvk_swiftshader.dll are in a subdirectory relative to chrome.exe > > > > Bug: chromium:1198567 > > Change-Id: I9e68927e512b239728fb2903d1a04702508a4948 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2873452 > > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Bug: chromium:1198567 > Bug: angleproject:5949 > Change-Id: Ib34067002c788f00b5ae2fa11d1e465f57bd7be8 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2893503 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1198567 Bug: angleproject:5949 Change-Id: Ic0be8949cc27b231be4f982ea6e22beed590d24d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2903786 Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate 7107a0f3 2021-05-16T15:37:44 CL: Load OpenCL without search path modification Make it possible to load libGLESv2 and OpenCL_ANGLE without adding ANGLE's binary directory to the search path. Bug: angleproject:5904 Change-Id: Ie810466b39e1101e4da5b9fd199d26683b129281 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897250 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate c2fd3388 2021-05-15T22:28:27 CL: Add front end object references to back end objects Add front end object references to back end objects, which requires a significant amount of refactoring, because the back end objects have to be constructed during the construction of the front end objects, so that the references can be passed to the back end objects, which then can be passed to the front end member initialization. That would have been easier with inheritance than with PImpl. Bug: angleproject:5904 Change-Id: Ib58e6a698e76987bdd63cd8088f923424d6c622b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897249 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 39ba247d 2021-05-06T18:06:01 Remove redundant OpenCL ICD library Removed redundant OpenCL ICD library, using regular OpenCL library instead. Bug: angleproject:5908 Change-Id: I1ecf5347557106511aed3c5c4a4bfa35590a559a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877240 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
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 16a919b1 2021-04-27T11:36:11 Add stubs for CL platform layer back ends Bug: angleproject:5904 Change-Id: If23c7f76013a17c3c67c13194566438035beb3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2853582 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>