Skip to content

Commit

Permalink
Add revision to XML extensions (#1161)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EwanC authored May 21, 2024
1 parent 6c8fcb4 commit 13ecb48
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 129 deletions.
19 changes: 19 additions & 0 deletions api/opencl_architecture.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2263,6 +2263,25 @@ typedef cl_uint cl_version;
((patch) & CL_VERSION_PATCH_MASK))
----

[NOTE]
--
The available version of an extension is exposed to the user via a macro
defined by the OpenCL Headers. This macro takes the format of the uppercase
extension name followed by the `_EXTENSION_VERSION` suffix. For example,
`CL_KHR_SEMAPHORE_EXTENSION_VERSION` is the macro defining the version of the
{cl_khr_semaphore_EXT} extension.

The value of this macro is set to the {cl_version_TYPE} of the extension using
the semantic version of the extension. If no semantic version is defined for
the extension, then the value of the macro is set to `0` to represent semantic
version `0.0.0`.

Applications can use these version macros along with the convience macros
defined in this section to guard their code against breaking changes to the API
of extensions, in particular provisional KHR extensions which have yet to
finalize an API.
--

[[version-name-pairing]]
==== Version-Name Pairing

Expand Down
Loading

0 comments on commit 13ecb48

Please sign in to comment.