Skip to content

remove the OpenCL extension specification#1516

Merged
bashbaug merged 8 commits intoKhronosGroup:mainfrom
bashbaug:remove-extension-spec
Jan 30, 2026
Merged

remove the OpenCL extension specification#1516
bashbaug merged 8 commits intoKhronosGroup:mainfrom
bashbaug:remove-extension-spec

Conversation

@bashbaug
Copy link
Contributor

fixes #437
fixes #1111

Moves the remaining content in the OpenCL extension specification into the main OpenCL API specification and the OpenCL C specification and removes the standalone OpenCL extension specification from the spec toolchain. Also updates the OpenCL reference pages and removes remaining links to the OpenCL extension specification.

Specifically:

  • Moves the description of clGetExtensionFunctionAddressForPlatform and the older clGetExtensionFunctionAddress into the OpenCL API specification, as a sub-section of The OpenCL Platform Layer.
  • Moves the extension naming conventions and header file conventions into the OpenCL API specification, as a sub-section of the existing OpenCL Extensions appendix.
  • Moves the information about extension defines and pragmas into the OpenCL C specification, as a sub-section of the existing Preprocessor Directives and Macros section.

@bashbaug bashbaug requested a review from oddhack January 13, 2026 06:20
@bashbaug
Copy link
Contributor Author

@oddhack would you mind giving these changes a quick review? We're aiming to merge in the OpenCL teleconference next week, on January 27th. Thanks!

OpenCL extensions approved by the OpenCL working group use the following
naming convention:

* A unique _name string_ of the form `*cl_khr_<__name__>*` or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a note that exts not approved by the WG are still found separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I added a note to the section about vendor extension conventions:

Vendor extensions are not currently included in the OpenCL specifications, but vendor extension specifications are frequently included in the online Registry of extensions.

The following convention should be followed for all extensions affecting the
host API:

[source,opencl]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you not generating vendor extension interfaces for the headers? I thought all that stuff was in the XML already but haven't looked in quite a while.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are, but it doesn't look like we include any information about the XML file in the spec, currently.

I'm open to adding this, but I would prefer to do so in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, for Vulkan we consider the XML to be a normative part of the spec (hard not to, since a substantial amount of the spec is generated from the XML), but the exact XML schema / toolchain are documented separately in the RNC schema and in a separate https://registry.khronos.org/vulkan/specs/latest/registry.html human-readable description of the schema. So in the spec we just point to the registry.html and mention the XML occasionally as a source of truth, but little more.

clGetExtensionFunctionAddressForPlatform - Returns the address of the extension function named by _funcname_ for a given _platform_.

== C Specification
== Specification
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be integrated in a refpage block in the API spec, along with the extensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done! Since the page is auto-generated now, I've removed the static page.

Copy link
Contributor

@oddhack oddhack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor suggestions for folding in additional stuff to the API spec.

@bashbaug
Copy link
Contributor Author

I think all of the review comments have been addressed, so I am going to go ahead and merge this. We can always make additional changes later. Thanks!

@bashbaug bashbaug merged commit 1dfc9b4 into KhronosGroup:main Jan 30, 2026
2 checks passed
@bashbaug bashbaug deleted the remove-extension-spec branch January 30, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants