Skip to content

Commit aeb1ab9

Browse files
Ewan Crawfordaharon-abramson
authored andcommitted
Add revision to XML extensions (KhronosGroup#1161)
This extension adds the revision field to the XML tag for extensions. This allows a version macro to be generated with: * KhronosGroup/OpenCL-Headers#251 * KhronosGroup/OpenCL-Headers#248 KHR extensions are given a revision based on the semantic version of the spec. However other extensions don't use semantic versioning, and so are given a placeholder `0.0.0` value until they can be updated by the owner. The XML schema is also updated to make the revision field mandatory in the XML entry for extensions and the existence of the macro this enables is advertised to users in the spec.
1 parent 5adeed2 commit aeb1ab9

3 files changed

Lines changed: 148 additions & 129 deletions

File tree

api/opencl_architecture.asciidoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,25 @@ typedef cl_uint cl_version;
22632263
((patch) & CL_VERSION_PATCH_MASK))
22642264
----
22652265

2266+
[NOTE]
2267+
--
2268+
The available version of an extension is exposed to the user via a macro
2269+
defined by the OpenCL Headers. This macro takes the format of the uppercase
2270+
extension name followed by the `_EXTENSION_VERSION` suffix. For example,
2271+
`CL_KHR_SEMAPHORE_EXTENSION_VERSION` is the macro defining the version of the
2272+
{cl_khr_semaphore_EXT} extension.
2273+
2274+
The value of this macro is set to the {cl_version_TYPE} of the extension using
2275+
the semantic version of the extension. If no semantic version is defined for
2276+
the extension, then the value of the macro is set to `0` to represent semantic
2277+
version `0.0.0`.
2278+
2279+
Applications can use these version macros along with the convience macros
2280+
defined in this section to guard their code against breaking changes to the API
2281+
of extensions, in particular provisional KHR extensions which have yet to
2282+
finalize an API.
2283+
--
2284+
22662285
[[version-name-pairing]]
22672286
==== Version-Name Pairing
22682287

0 commit comments

Comments
 (0)