Skip to content

Commit 8d4cc09

Browse files
committed
error consistency for clGetMemObjectInfo
1 parent f0d56e0 commit 8d4cc09

1 file changed

Lines changed: 32 additions & 37 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6559,8 +6559,8 @@ Otherwise, it returns one of the following errors:
65596559
* {CL_INVALID_VALUE}
65606560
** if _num_mem_objects_ is zero
65616561
** if _mem_objects_ is `NULL`
6562-
** if _flags_ is not zero and is not a vakud combination of the values
6563-
described in the <<migration-flags-table,Memory migration Flags>> table
6562+
** if _flags_ is not zero and is not a valid combination of the values
6563+
described in the <<migration-flags-table, Memory migration Flags>> table
65646564
* {CL_INVALID_EVENT_WAIT_LIST}
65656565
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ greater than zero
65666566
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
@@ -6795,51 +6795,46 @@ endif::cl_ext_buffer_device_address[]
67956795
successfully.
67966796
Otherwise, it returns one of the following errors:
67976797

6798-
* {CL_INVALID_MEM_OBJECT} if _memobj_ is a not a valid memory object.
6799-
ifdef::cl_ext_buffer_device_address[]
6800-
* {CL_INVALID_OPERATION} is returned for the {CL_MEM_DEVICE_ADDRESS_EXT} query if
6801-
the {cl_ext_buffer_device_address_EXT} is not supported or if the
6802-
buffer was not allocated with {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT}.
6803-
endif::cl_ext_buffer_device_address[]
6804-
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values, or
6805-
if the size in bytes specified by _param_value_size_ is less than size of
6798+
* {CL_INVALID_MEM_OBJECT}
6799+
** if _memobj_ is a not a valid memory object
6800+
* {CL_INVALID_VALUE}
6801+
** if _param_name_ is not one of the supported values
6802+
** if the size in bytes specified by _param_value_size_ is less than size of
68066803
the return type specified in the
68076804
<<mem-info-table, Memory Object Queries>> table
6808-
and _param_value_ is not `NULL`.
6809-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
6810-
by the OpenCL implementation on the device.
6811-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
6812-
required by the OpenCL implementation on the host.
6813-
6805+
and _param_value_ is not `NULL`
6806+
ifdef::cl_ext_buffer_device_address[]
6807+
* {CL_INVALID_OPERATION}
6808+
** if the {cl_ext_buffer_device_address_EXT} extension is supported, if
6809+
_param_name_ is {CL_MEM_DEVICE_ADDRESS_EXT}, and if _memobj_ was not created
6810+
with the {CL_MEM_DEVICE_PRIVATE_ADDRESS_EXT} property set to {CL_TRUE}
6811+
endif::cl_ext_buffer_device_address[]
68146812
ifdef::cl_khr_dx9_media_sharing[]
6815-
The following errors may be returned if the {cl_khr_dx9_media_sharing_EXT}
6816-
extension is supported:
6817-
6818-
* {CL_INVALID_DX9_MEDIA_SURFACE_KHR} if _param_name_ is
6819-
{CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR} and _memobj_ was not created by
6820-
calling {clCreateFromDX9MediaSurfaceKHR} from a Direct3D9 surface.
6813+
* {CL_INVALID_DX9_MEDIA_SURFACE_KHR}
6814+
** if the {cl_khr_dx9_media_sharing_EXT} extension is supported, if
6815+
_param_name_ is {CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR}, and if _memobj_ was not
6816+
created by calling {clCreateFromDX9MediaSurfaceKHR}
68216817
endif::cl_khr_dx9_media_sharing[]
6822-
68236818
ifdef::cl_khr_d3d10_sharing[]
6824-
The following errors may be returned if the {cl_khr_d3d10_sharing_EXT}
6825-
extension is supported:
6826-
6827-
* {CL_INVALID_D3D10_RESOURCE_KHR} if _param_name_ is
6828-
{CL_MEM_D3D10_RESOURCE_KHR} and _memobj_ was not created by calling
6819+
* {CL_INVALID_D3D10_RESOURCE_KHR}
6820+
** if the {cl_khr_d3d10_sharing_EXT} extension is supported, if _param_name_
6821+
is {CL_MEM_D3D10_RESOURCE_KHR}, and if _memobj_ was not created by calling
68296822
{clCreateFromD3D10BufferKHR}, {clCreateFromD3D10Texture2DKHR}, or
6830-
{clCreateFromD3D10Texture3DKHR}.
6823+
{clCreateFromD3D10Texture3DKHR}
68316824
endif::cl_khr_d3d10_sharing[]
6832-
68336825
ifdef::cl_khr_d3d11_sharing[]
6834-
The following errors may be returned if the {cl_khr_d3d11_sharing_EXT}
6835-
extension is supported:
6836-
6837-
* {CL_INVALID_D3D11_RESOURCE_KHR} if _param_name_ is
6838-
{CL_MEM_D3D11_RESOURCE_KHR} and _memobj_ was not created by calling
6826+
* {CL_INVALID_D3D11_RESOURCE_KHR}
6827+
** if the {cl_khr_d3d11_sharing_EXT} extension is supported, if _param_name_
6828+
is {CL_MEM_D3D11_RESOURCE_KHR} and if _memobj_ was not created by calling
68396829
{clCreateFromD3D11BufferKHR}, {clCreateFromD3D11Texture2DKHR}, or
6840-
{clCreateFromD3D11Texture3DKHR}.
6830+
{clCreateFromD3D11Texture3DKHR}
68416831
endif::cl_khr_d3d11_sharing[]
6842-
6832+
* {CL_OUT_OF_RESOURCES}
6833+
** if there is a failure to allocate resources required by the OpenCL
6834+
implementation on the device
6835+
* {CL_OUT_OF_HOST_MEMORY}
6836+
** if there is a failure to allocate resources required by the OpenCL
6837+
implementation on the host
68436838
--
68446839

68456840

0 commit comments

Comments
 (0)