Skip to content

Commit

Permalink
Merge branch 'main' into extension-dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Apr 2, 2024
2 parents ed52e2f + 75df78c commit 74b0baf
Show file tree
Hide file tree
Showing 35 changed files with 1,104 additions and 577 deletions.
2 changes: 1 addition & 1 deletion OpenCL_API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include::config/version-local-links.asciidoc[]
// Formatting and links for API functions and enums.
include::api/dictionary.asciidoc[]

// Feature Dictionary - used by some extensions.
// Feature Dictionary.
include::c/feature-dictionary.asciidoc[]

// External Footnotes
Expand Down
840 changes: 459 additions & 381 deletions OpenCL_C.txt

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions OpenCL_Ext.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ include::ext/introduction.asciidoc[]
// included markup in the OpenCL API and C Language Specifications, rather
// than being included here as separate documents.

// These are SPIR-V Extensions:

include::ext/spirv_extensions.asciidoc[]

// Index and Appendices:

ifdef::backend-pdf[]
Expand Down
5 changes: 5 additions & 0 deletions api/appendix_e.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -598,3 +598,8 @@ Changes from *v3.0.14*:
** Restricted semaphores to a single associated device, see {khronos-opencl-pr}/996[#996].
* {cl_khr_subgroup_rotate_EXT}:
** Clarified that only rotating within a subgroup is supported, see {khronos-opencl-pr}/967[#967].

Changes from *v3.0.15*:

* Added new extensions:
** `<<cl_khr_kernel_clock>>` (provisional)
124 changes: 118 additions & 6 deletions api/appendix_f.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ include::{generated}/api/version-notes/CL_INVALID_EVENT.asciidoc[]
include::{generated}/api/version-notes/CL_INVALID_EVENT_WAIT_LIST.asciidoc[]
| Returned when the specified event wait list or number of events in the wait list is not valid.

// This is currently defined in cl.h, but it's not a core API error code.
//| {CL_INVALID_GL_OBJECT_anchor}
//
//include::{generated}/api/version-notes/CL_INVALID_GL_OBJECT.asciidoc[]
//|

| {CL_INVALID_GLOBAL_OFFSET_anchor}

include::{generated}/api/version-notes/CL_INVALID_GLOBAL_OFFSET.asciidoc[]
Expand Down Expand Up @@ -332,11 +326,129 @@ include::{generated}/api/version-notes/CL_MAX_SIZE_RESTRICTION_EXCEEDED.asciidoc
include::{generated}/api/version-notes/CL_PROFILING_INFO_NOT_AVAILABLE.asciidoc[]
| Returned by {clGetEventProfilingInfo} when the command associated with the specified event was not enqueued into a command-queue with {CL_QUEUE_PROFILING_ENABLE}.

ifdef::cl_khr_command_buffer[]
| {CL_INVALID_COMMAND_BUFFER_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_COMMAND_BUFFER_KHR.asciidoc[]
| Returned when the specified command-buffer is not a <<valid-object-definition,valid command-buffer>>.

| {CL_INVALID_SYNC_POINT_WAIT_LIST_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_SYNC_POINT_WAIT_LIST_KHR.asciidoc[]
| Returned when the specified sync point wait list or number of sync points in the wait list is not valid.

| {CL_INCOMPATIBLE_COMMAND_QUEUE_KHR_anchor}

include::{generated}/api/version-notes/CL_INCOMPATIBLE_COMMAND_QUEUE_KHR.asciidoc[]
| Returned when one or more command-queues is incompatible with a command-buffer.
endif::cl_khr_command_buffer[]

ifdef::cl_khr_command_buffer_mutable_dispatch[]
| {CL_INVALID_MUTABLE_COMMAND_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_MUTABLE_COMMAND_KHR.asciidoc[]
| Returned when a specified command is not a <<valid-object-definition,valid mutable-command object>>.
endif::cl_khr_command_buffer_mutable_dispatch[]

ifdef::cl_khr_d3d10_sharing[]
| {CL_INVALID_D3D10_DEVICE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_D3D10_DEVICE_KHR.asciidoc[]
| Returned when a Direct3D 10 device cannot interoperate with OpenCL device IDs.
| {CL_INVALID_D3D10_RESOURCE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_D3D10_RESOURCE_KHR.asciidoc[]
| Returned when an OpenCL object cannot be created from a Direct3D 10 resource.
| {CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to acquire an OpenCL object created from a Direct3D 10 resource that was already acquired.
| {CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to release an OpenCL object created from a Direct3D 10 resource that has not been acquired.
endif::cl_khr_d3d10_sharing[]

ifdef::cl_khr_d3d11_sharing[]
| {CL_INVALID_D3D11_DEVICE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_D3D11_DEVICE_KHR.asciidoc[]
| Returned when a Direct3D 11 device cannot interoperate with OpenCL device IDs.
| {CL_INVALID_D3D11_RESOURCE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_D3D11_RESOURCE_KHR.asciidoc[]
| Returned when an OpenCL object cannot be created from a Direct3D 11 resource.
| {CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to acquire an OpenCL object created from a Direct3D 11 resource that was already acquired.
| {CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to release an OpenCL object created from a Direct3D 11 resource that has not been acquired.
endif::cl_khr_d3d11_sharing[]

ifdef::cl_khr_dx9_media_sharing[]
| {CL_INVALID_DX9_MEDIA_ADAPTER_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_DX9_MEDIA_ADAPTER_KHR.asciidoc[]
| Returned when a DirectX 9 media adapter cannot interoperate with OpenCL device IDs.
| {CL_INVALID_DX9_MEDIA_SURFACE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_DX9_MEDIA_SURFACE_KHR.asciidoc[]
| Returned when an OpenCL object cannot be created from a DirectX 9 media surface.
| {CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to acquire an OpenCL object created from a DirectX 9 media surface that was already acquired.
| {CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR.asciidoc[]
| Returned when attempting to release an OpenCL object created from a DirectX 9 media surface that has not been acquired.
endif::cl_khr_dx9_media_sharing[]

ifdef::cl_khr_egl_image[]
| {CL_EGL_RESOURCE_NOT_ACQUIRED_KHR_anchor}

include::{generated}/api/version-notes/CL_EGL_RESOURCE_NOT_ACQUIRED_KHR.asciidoc[]
| Possible event status if an EGL resource is used without being acquired.
| {CL_INVALID_EGL_OBJECT_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_EGL_OBJECT_KHR.asciidoc[]
| Returned when the specified EGL object is not valid.
endif::cl_khr_egl_image[]

ifdef::cl_khr_gl_sharing[]
// Note: This is currently defined in cl.h, but it's not a core API error code.
| {CL_INVALID_GL_OBJECT_anchor}

include::{generated}/api/version-notes/CL_INVALID_GL_OBJECT.asciidoc[]
| Returned when the specified OpenGL object is not valid, or when there is no associated OpenGL object for an OpenCL object.
| {CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR.asciidoc[]
| Returned when the specified OpenGL sharing context creation property is not valid.
endif::cl_khr_gl_sharing[]

ifdef::cl_khr_icd[]
| {CL_PLATFORM_NOT_FOUND_KHR_anchor}

include::{generated}/api/version-notes/CL_PLATFORM_NOT_FOUND_KHR.asciidoc[]
| Returned by {clGetPlatformIDs} when no platforms are available.
endif::cl_khr_icd[]

ifdef::cl_khr_semaphore[]
| {CL_INVALID_SEMAPHORE_KHR_anchor}

include::{generated}/api/version-notes/CL_INVALID_SEMAPHORE_KHR.asciidoc[]
| Returned when the specified semaphore is not a <<valid-object-definition,valid semaphore>>.
endif::cl_khr_semaphore[]

ifdef::cl_khr_terminate_context[]
| {CL_CONTEXT_TERMINATED_KHR_anchor}

include::{generated}/api/version-notes/CL_CONTEXT_TERMINATED_KHR.asciidoc[]
| Returned when the specified context has already been terminated, or as an event status for terminated commands.
endif::cl_khr_terminate_context[]

|====
2 changes: 1 addition & 1 deletion api/cl_khr_command_buffer_mutable_dispatch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ also be updated between enqueues of the command-buffer.
* {cl_command_buffer_structure_type_khr_TYPE}
** {CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR}
** {CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR}
* New <<error_codes, Error Codes>>
* New Error Codes
** {CL_INVALID_MUTABLE_COMMAND_KHR}

=== Sample Code
Expand Down
2 changes: 1 addition & 1 deletion api/cl_khr_d3d10_sharing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ include::{generated}/meta/{refprefix}cl_khr_d3d10_sharing.txt[]
** {CL_MEM_D3D10_RESOURCE_KHR}
* {cl_image_info_TYPE}
** {CL_IMAGE_D3D10_SUBRESOURCE_KHR}
* {cl_event_info_TYPE}
* {cl_command_type_TYPE}
** {CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR}
** {CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR}
* New Error Codes
Expand Down
2 changes: 1 addition & 1 deletion api/cl_khr_d3d11_sharing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ include::{generated}/meta/{refprefix}cl_khr_d3d11_sharing.txt[]
** {CL_MEM_D3D11_RESOURCE_KHR}
* {cl_image_info_TYPE}
** {CL_IMAGE_D3D11_SUBRESOURCE_KHR}
* {cl_event_info_TYPE}
* {cl_command_type_TYPE}
** {CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR}
** {CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR}
* New Error Codes
Expand Down
2 changes: 1 addition & 1 deletion api/cl_khr_dx9_media_sharing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ adapter.
** {CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR}
* {cl_image_info_TYPE}
** {CL_IMAGE_DX9_MEDIA_PLANE_KHR}
* {cl_event_info_TYPE}
* {cl_command_type_TYPE}
** {CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR}
** {CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR}
* New Error Codes
Expand Down
7 changes: 3 additions & 4 deletions api/cl_khr_egl_event.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ functionality of creating an EGL sync object from an OpenCL event object.

=== New Enums

* New Error Codes
** {CL_INVALID_EGL_OBJECT_KHR}
* {cl_command_type_TYPE}
** {CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR}

=== Issues
Expand Down Expand Up @@ -57,13 +56,13 @@ context, and to reach into each such context.
*RESOLVED* Use is limited to calls to acquire and release memory objects only.
--

. What is the desired behaviour for this extension when EGLSyncKHR is of a
. What is the desired behavior for this extension when EGLSyncKHR is of a
type other than `EGL_SYNC_FENCE_KHR`?
+
--
*RESOLVED* This extension only requires support for `EGL_SYNC_FENCE_KHR`.
Support of other types is an implementation choice, and will result in
CL_INVALID_EGL_OBJECT_KHR if unsupported.
{CL_INVALID_EGL_OBJECT_KHR} if unsupported.
--

=== Version History
Expand Down
2 changes: 1 addition & 1 deletion api/cl_khr_egl_image.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ from from EGLImages.

=== New Enums

* {cl_event_info_TYPE}
* {cl_command_type_TYPE}
** {CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR}
** {CL_COMMAND_RELEASE_EGL_OBJECTS_KHR}
* New Error Codes
Expand Down
20 changes: 10 additions & 10 deletions api/cl_khr_extended_versioning.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ Versioning>> section.

=== New Macro Names

* {CL_VERSION_MAJOR_BITS_KHR}
* {CL_VERSION_MINOR_BITS_KHR}
* {CL_VERSION_PATCH_BITS_KHR}
* `CL_VERSION_MAJOR_MASK_KHR`
* `CL_VERSION_MINOR_MASK_KHR`
* `CL_VERSION_PATCH_MASK_KHR`
* `CL_VERSION_MAJOR_KHR`
* `CL_VERSION_MINOR_KHR`
* `CL_VERSION_PATCH_KHR`
* `CL_MAKE_VERSION_KHR`
* {CL_VERSION_MAJOR_BITS_KHR_anchor}
* {CL_VERSION_MINOR_BITS_KHR_anchor}
* {CL_VERSION_PATCH_BITS_KHR_anchor}
* {CL_VERSION_MAJOR_MASK_KHR_anchor}
* {CL_VERSION_MINOR_MASK_KHR_anchor}
* {CL_VERSION_PATCH_MASK_KHR_anchor}
* {CL_VERSION_MAJOR_KHR_anchor}
* {CL_VERSION_MINOR_KHR_anchor}
* {CL_VERSION_PATCH_KHR_anchor}
* {CL_MAKE_VERSION_KHR_anchor}

=== New Enums

Expand Down
2 changes: 1 addition & 1 deletion api/cl_khr_external_memory.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TODO
** {CL_MEM_DEVICE_HANDLE_LIST_KHR}
** {CL_MEM_DEVICE_HANDLE_LIST_END_KHR}
* Return values from from {clGetEventInfo} when _param_name_ is
{CL_EVENT_COMMAND_TYPE}:
{cl_command_type_TYPE}:
** {CL_COMMAND_ACQUIRE_EXTERNAL_MEM_OBJECTS_KHR}
** {CL_COMMAND_RELEASE_EXTERNAL_MEM_OBJECTS_KHR}

Expand Down
5 changes: 2 additions & 3 deletions api/cl_khr_gl_sharing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ and buffer object images with OpenCL is required by this extension.

=== New Enums

* New Error Codes
** {CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR}
* {cl_gl_context_info_TYPE}
** {CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR}
** {CL_DEVICES_FOR_GL_CONTEXT_KHR}
Expand All @@ -86,7 +84,8 @@ and buffer object images with OpenCL is required by this extension.
* {cl_gl_texture_info_TYPE}
** {CL_GL_TEXTURE_TARGET}
** {CL_GL_MIPMAP_LEVEL}

* New Error Codes
** {CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR}

=== Issues

Expand Down
62 changes: 62 additions & 0 deletions api/cl_khr_kernel_clock.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2024 The Khronos Group Inc.
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}cl_khr_kernel_clock.txt[]

=== Other Extension Metadata

*Last Modified Date*::
2024-03-25
*IP Status*::
No known IP claims.
*Contributors*::
- Kevin Petit, Arm Ltd. +
- Paul Fradgley, Imagination Technologies +
- Jeremy Kemp, Imagination Technologies +
- Ben Ashbaugh, Intel +
- Balaji Calidas, Qualcomm Technologies, Inc. +
- Ruihao Zhang, Qualcomm Technologies, Inc.

=== Description

`cl_khr_kernel_clock` adds the ability for a kernel to sample the value from one
of three clocks provided by compute units.

OpenCL C compilers supporting this extension will define the extension macro
`cl_khr_kernel_clock`, and may define corresponding feature macros
{opencl_c_kernel_clock_scope_device},
{opencl_c_kernel_clock_scope_work_group}, and
{opencl_c_kernel_clock_scope_sub_group} depending on the reported
capabilities.

See the link:{OpenCLCSpecURL}#cl_khr_kernel_clock[Kernel Clock] section of the
OpenCL C specification for more information.

=== Interactions With Other Extensions

On devices that implement the `EMBEDDED` profile, the `cles_khr_int64` extension
is required for the `clock_read_device`, `clock_read_work_group` and
`clock_read_sub_group` functions to be present.

Support for sub-groups is required for the `clock_read_sub_group` and
`clock_read_hilo_sub_group` functions to be present.

// The 'New ...' section can be auto-generated

=== New Types

* {cl_device_kernel_clock_capabilities_khr_TYPE}

=== New Enums

* {cl_device_info_TYPE}
** {CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR}
* {cl_device_kernel_clock_capabilities_khr_TYPE}
** {CL_DEVICE_KERNEL_CLOCK_SCOPE_DEVICE_KHR}
** {CL_DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP_KHR}
** {CL_DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP_KHR}

=== Version History

* Revision 0.9.0, 2024-03-25
** First assigned version (provisional).
2 changes: 1 addition & 1 deletion api/cl_khr_semaphore.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ In particular, this extension defines:
** {CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR}
** {CL_SEMAPHORE_DEVICE_HANDLE_LIST_END_KHR}
// TODO these are not described anywhere in the extension spec document
* New return values from {clGetEventInfo}
* {cl_command_type_TYPE}
** {CL_COMMAND_SEMAPHORE_WAIT_KHR}
** {CL_COMMAND_SEMAPHORE_SIGNAL_KHR}
* New Error Codes
Expand Down
27 changes: 27 additions & 0 deletions api/cl_khr_spirv_extended_debug_info.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2017-2024 The Khronos Group Inc.
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}cl_khr_spirv_extended_debug_info.txt[]

=== Other Extension Metadata

*Last Modified Date*::
2020-04-21
*IP Status*::
No known IP claims.
*Contributors*::
TBD

=== Description

`cl_khr_spirv_extended_debug_info` allows use of the SPIR-V
`OpenCL.DebugInfo.100` extended instruction set.

See the
link:{OpenCLEnvSpecURL}#_cl_khr_spirv_extended_debug_info[cl_khr_spirv_extended_debug_info]
section of the OpenCL SPIR-V Environment specification for more information.

=== Version History

* Revision 1.0.0, 2020-04-21
** First assigned version.
Loading

0 comments on commit 74b0baf

Please sign in to comment.