aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Plate <jplate@google.com>2021-05-09 00:35:24 +0100
committerCommit Bot <commit-bot@chromium.org>2021-05-13 15:23:11 +0000
commitb300dc52be4879217760de1ce45ffeba28c067ac (patch)
treede77ef8cbc78a076b3f425b029358526fc70b491 /include
parentb0d39ba2aba218402ff2f32f6e16f18cf4975ff4 (diff)
downloadangle-b300dc52be4879217760de1ce45ffeba28c067ac.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/angle_cl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/angle_cl.h b/include/angle_cl.h
index 955f8f9126..7b4ace08fd 100644
--- a/include/angle_cl.h
+++ b/include/angle_cl.h
@@ -37,6 +37,9 @@ struct Dispatch
constexpr const cl_icd_dispatch &getDispatch() { return *mDispatch; }
+ protected:
+ bool isCompatible(void *ptr) const { return ptr == &mDispatch; }
+
private:
// This has to be the first member to be OpenCL ICD compatible
const cl_icd_dispatch *const mDispatch;