Skip to content

Commit dac4714

Browse files
committed
error consistency for copying images
1 parent 9652eed commit dac4714

1 file changed

Lines changed: 48 additions & 47 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ Otherwise, it returns one of the following errors:
13741374
* {CL_INVALID_CONTEXT}
13751375
** if the context associated with _command_queue_ and _src_buffer_ are not the same
13761376
** if the context associated with _command_queue_ and _dst_buffer_ are not the same
1377-
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same.
1377+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
13781378
* {CL_INVALID_MEM_OBJECT}
13791379
** if _src_buffer_ is not a valid buffer object
13801380
** if _dst_buffer_ is not a valid buffer object
@@ -1512,7 +1512,7 @@ Otherwise, it returns one of the following errors:
15121512
* {CL_INVALID_CONTEXT}
15131513
** if the context associated with _command_queue_ and _src_buffer_ are not the same
15141514
** if the context associated with _command_queue_ and _dst_buffer_ are not the same
1515-
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same.
1515+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
15161516
* {CL_INVALID_MEM_OBJECT}
15171517
** if _src_buffer_ is not a valid buffer object
15181518
** if _dst_buffer_ is not a valid buffer object
@@ -3731,7 +3731,7 @@ Otherwise, it returns one of the following errors:
37313731
** if _origin_ is `NULL`
37323732
** if _region_ is `NULL`
37333733
** if the region being read or written specified by _origin_ and _region_ is out of bounds
3734-
** if values in _origin_ and _region_ do not follow rules described in the argument description for _origin_ and _region_
3734+
** if values in _origin_ and _region_ do not follow the rules described in the argument description for _origin_ and _region_
37353735
** if _image_ is a 1D or 2D image and _slice_pitch_ or _input_slice_pitch_ is not zero
37363736
** if _ptr_ is `NULL`
37373737
ifdef::cl_khr_mipmap_image[]
@@ -3901,54 +3901,55 @@ argument value specified when _src_image_ or _dst_image_ is created is ignored b
39013901
successfully.
39023902
Otherwise, it returns one of the following errors:
39033903

3904-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
3905-
command-queue.
3906-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_,
3907-
_src_image_ and _dst_image_ are not the same or if the context
3908-
associated with _command_queue_ and events in _event_wait_list_ are not
3909-
the same.
3910-
* {CL_INVALID_MEM_OBJECT} if _src_image_ and _dst_image_ are not valid image
3911-
objects.
3912-
* {CL_IMAGE_FORMAT_MISMATCH} if _src_image_ and _dst_image_ do not use the
3913-
same image format.
3914-
* {CL_INVALID_VALUE} if _src_origin_, _dst_origin_, or _region_ is `NULL`.
3915-
* {CL_INVALID_VALUE} if the 2D or 3D rectangular region specified by
3916-
_src_origin_ and _src_origin_ {plus} _region_ refers to a region outside
3917-
_src_image_, or if the 2D or 3D rectangular region specified by
3918-
_dst_origin_ and _dst_origin_ {plus} _region_ refers to a region outside
3919-
_dst_image_.
3920-
* {CL_INVALID_VALUE} if values in _src_origin_, _dst_origin_ and _region_ do
3921-
not follow rules described in the argument description for _src_origin_,
3922-
_dst_origin_ and _region_.
3923-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
3924-
_num_events_in_wait_list_ > 0, or _event_wait_list_ is not `NULL` and
3925-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
3926-
are not valid events.
3927-
* {CL_INVALID_IMAGE_SIZE} if image dimensions (image width, height,
3928-
specified or compute row and/or slice pitch) for _src_image_ or
3929-
_dst_image_ are not supported by device associated with _queue_.
3930-
* {CL_IMAGE_FORMAT_NOT_SUPPORTED} if image format (image channel order and
3931-
data type) for _src_image_ or _dst_image_ are not supported by device
3932-
associated with _queue_.
3933-
* {CL_MEM_OBJECT_ALLOCATION_FAILURE} if there is a failure to allocate
3934-
memory for data store associated with _src_image_ or _dst_image_.
3935-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
3936-
by the OpenCL implementation on the device.
3937-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
3938-
required by the OpenCL implementation on the host.
3939-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does
3940-
not support images (i.e. {CL_DEVICE_IMAGE_SUPPORT} specified in the
3941-
<<device-queries-table,Device Queries>> table is {CL_FALSE}).
3942-
* {CL_MEM_COPY_OVERLAP} if _src_image_ and _dst_image_ are the same image
3943-
object and the source and destination regions overlap.
3904+
* {CL_INVALID_COMMAND_QUEUE}
3905+
** if _command_queue_ is not a valid host command-queue
3906+
* {CL_INVALID_CONTEXT}
3907+
** if the context associated with _command_queue_ and _src_image_ are not the same
3908+
** if the context associated with _command_queue_ and _dst_image_ are not the same
3909+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
3910+
* {CL_INVALID_MEM_OBJECT}
3911+
** if _src_image_ is not a valid image object
3912+
** if _dst_image_ is not a valid image object
3913+
* {CL_IMAGE_FORMAT_MISMATCH}
3914+
** if _src_image_ and _dst_image_ do not use the same image format
3915+
* {CL_INVALID_VALUE}
3916+
** if _src_origin_ is `NULL`
3917+
** if _dst_origin_ is `NULL`
3918+
** if _region_ is `NULL`
3919+
** if the 2D or 3D rectangular region specified by _src_origin_ and _region_ refers to a region outside _src_image_
3920+
** if the 2D or 3D rectangular region specified by _dst_origin_ and _region_ refers to a region outside _dst_image_
3921+
** if values in _src_origin_, _dst_origin_, and _region_ do not follow the rules described in the argument descriptions for _src_origin_, _dst_origin_ and _region_
39443922
ifdef::cl_khr_mipmap_image[]
3945-
* {CL_INVALID_MIP_LEVEL} if the {cl_khr_mipmap_image_EXT} extension is
3946-
supported, and the mip level specified in _src_origin_ or _dst_origin_
3947-
is not a valid level for the corresponding _src_image_ or _dst_image_,
3923+
* {CL_INVALID_MIP_LEVEL}
3924+
** if the {cl_khr_mipmap_image_EXT} extension is supported and the mip level specified in _src_origin_ is not a valid level for _src_image_
3925+
** if the {cl_khr_mipmap_image_EXT} extension is supported and the mip level specified in _dst_origin_ is not a valid level for _dst_image_
39483926
endif::cl_khr_mipmap_image[]
3927+
* {CL_INVALID_EVENT_WAIT_LIST}
3928+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ greater than zero
3929+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
3930+
** if event objects in _event_wait_list_ are not valid events
3931+
* {CL_INVALID_IMAGE_SIZE}
3932+
** if the dimensions for _src_image_ or _dst_image_, such as the image width or image height,
3933+
are not supported by the device associated with _command_queue_
3934+
* {CL_IMAGE_FORMAT_NOT_SUPPORTED}
3935+
** if the format for _src_image_ or _dst_image_, such as the image channel order or image
3936+
channel data type, are not supported by the device associated with
3937+
_command_queue_
3938+
* {CL_MEM_COPY_OVERLAP}
3939+
** if _src_image_ and _dst_image_ are the same image object and the source and destination regions overlap
3940+
* {CL_MEM_OBJECT_ALLOCATION_FAILURE}
3941+
** if there is a failure to allocate memory for data store associated with _src_image_ or _dst_image_
3942+
* {CL_INVALID_OPERATION}
3943+
** if the device associated with _command_queue_ does not support images (the query for {CL_DEVICE_IMAGE_SUPPORT} returns {CL_FALSE})
39493944
ifdef::cl_ext_immutable_memory_objects[]
3950-
* {CL_INVALID_OPERATION} if _dst_image_ was created with {CL_MEM_IMMUTABLE_EXT}.
3945+
** if _dst_image_ was created with {CL_MEM_IMMUTABLE_EXT}
39513946
endif::cl_ext_immutable_memory_objects[]
3947+
* {CL_OUT_OF_RESOURCES}
3948+
** if there is a failure to allocate resources required by the OpenCL
3949+
implementation on the device
3950+
* {CL_OUT_OF_HOST_MEMORY}
3951+
** if there is a failure to allocate resources required by the OpenCL
3952+
implementation on the host
39523953
--
39533954

39543955

0 commit comments

Comments
 (0)