Skip to content

Commit

Permalink
Add revision to XML extensions
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 committed May 15, 2024
1 parent 0483627 commit eef0acf
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 129 deletions.
18 changes: 18 additions & 0 deletions api/opencl_architecture.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2263,6 +2263,24 @@ typedef cl_uint cl_version;
((patch) & CL_VERSION_PATCH_MASK))
----

[NOTE]
--
The OpenCL headers make the version of an extension defined in the headers
available using a macro. This macro takes the format of the uppercase extension
name followed by the `EXTENSION_VERSION` suffix. For example,
`CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_VERSION` is the macro defining the
version of the {cl_khr_command_queue_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` (semantic version
`0.0.0`).

Applications can use this macro to guard their code against API breaking
changes to the API of extensions, in particular provisional KHR extensions
which have yet to finalize the API.
--

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

Expand Down
Loading

0 comments on commit eef0acf

Please sign in to comment.