@@ -102,6 +102,7 @@ include::{generated}/api/protos/clIcdGetFunctionAddressForPlatformKHR.txt[]
102102include::{generated}/api/version-notes/clIcdGetFunctionAddressForPlatformKHR.asciidoc[]
103103
104104 * _platform_ refers to the platform ID returned by {clIcdGetPlatformIDsKHR}
105+ or by {clIcdCreateInstancePlatformKHR}
105106 * _func_name_ name of an API entry point
106107
107108{clIcdGetFunctionAddressForPlatformKHR} returns the address of the API entry
@@ -137,6 +138,57 @@ Otherwise, it returns one of the following errors:
137138 implementation on the host
138139--
139140
141+ [open,refpage='clIcdCreateInstancePlatformKHR',desc='Create an instance of a platform',type='protos']
142+ --
143+ An instance platform can be created by the ICD Loader by using the following
144+ function:
145+
146+ include::{generated}/api/protos/clIcdCreateInstancePlatformKHR.txt[]
147+ include::{generated}/api/version-notes/clIcdCreateInstancePlatformKHR.asciidoc[]
148+
149+ * _platform_ refers to the platform ID returned by {clIcdGetPlatformIDsKHR}
150+
151+ * _properties_ specifies a list of instance platform property names and their
152+ corresponding values. Each property name is immediately followed by the
153+ corresponding desired value. The list is terminated with
154+ {CL_INSTANCE_PLATFORM_PROPERTIES_LIST_END_KHR_anchor}. No properties are
155+ supported currently. _properties_ can be NULL, in which case all properties
156+ take on their default values.
157+
158+ * _errcode_ret_ will return an appropriate error code as described below.
159+ If _errcode_ret_ is `NULL`, no error code is returned.
160+
161+ {clIcdCreateInstancePlatformKHR} returns a valid non-zero OpenCL platform object
162+ and _errcode_ret_ is set to {CL_SUCCESS} if the instance platform object is
163+ created successfully.
164+ Otherwise, it returns a `NULL` value with one of the following error values
165+ returned in _errcode_ret_:
166+
167+ * {CL_INVALID_PLATFORM} if _platform_ is not a valid platform.
168+ * {CL_INVALID_PROPERTY} if an instance platform property name in
169+ _properties_ is not a supported property name, if the value specified for
170+ a supported property name is not valid, or if the same property name is
171+ specified more than once.
172+ * {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
173+ required by the OpenCL implementation on the host.
174+ --
175+
176+ [open,refpage='clIcdDestroyInstancePlatformKHR',desc='Destroy an instance of a platform',type='protos']
177+ --
178+ An instance platform can be destroyed by the ICD Loader by using the following
179+ function:
180+
181+ include::{generated}/api/protos/clIcdDestroyInstancePlatformKHR.txt[]
182+ include::{generated}/api/version-notes/clIcdDestroyInstancePlatformKHR.asciidoc[]
183+
184+ * _platform_ refers to the instance platform object returned by
185+ {clIcdCreateInstancePlatformKHR}
186+
187+ {clIcdDestroyInstancePlatformKHR} returns {CL_SUCCESS} if the function is
188+ executed successfully.
189+ It returns {CL_INVALID_PLATFORM} if _platform_ is not a valid instance platform.
190+ --
191+
140192endif::cl_khr_icd[]
141193
142194[open,refpage='clGetPlatformInfo',desc='Query information about an OpenCL platform',type='protos']
0 commit comments