Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
John Plate 695625461e 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>
2021-06-17 17:13:07 +00:00
John Plate 2c8d9a9a00 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>
2021-06-14 16:26:58 +00:00
John Plate 55df3ec11c 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>
2021-06-11 08:48:48 +00:00
John Plate 82654e5d51 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>
2021-06-10 18:16:52 +00:00
John Plate baca10b7f2 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>
2021-06-02 16:04:49 +00:00
John Plate 076974a96a 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>
2021-06-02 15:18:58 +00:00
John Plate c2fd338822 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>
2021-05-18 11:46:43 +00:00
John Plate 48b835cf28 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>
2021-05-14 09:19:05 +00:00
John Plate b300dc52be 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>
2021-05-13 15:23:11 +00:00
John Plate 05fb22724f 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>
2021-05-03 17:27:16 +00:00
John Plate 908ead3842 Updated OpenCL headers
Bug: angleproject:5761
Change-Id: I45e0f9a422a0dd94fec854d3387f676192e020eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2831303
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: John Plate <jplate@google.com>
2021-04-22 19:15:17 +00:00
John Plate 9e1ccb240f Workaround for missing include in OpenCL headers
Bug: angleproject:5759
Change-Id: Ieeb5a251e614a4df1b5362dee474b368f362e0fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2826121
Commit-Queue: John Plate <jplate@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-04-14 16:48:24 +00:00
John Plate 1d7046ca5d 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>
2021-04-13 12:41:45 +00:00