Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add and link error codes for extensions #1119

Merged
merged 12 commits into from
Apr 2, 2024
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
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
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