Skip to content

Commit e250fcd

Browse files
authored
further clarify a clCreateBuffer with SVM pointer error condition (#1189)
It should also be invalid to use SVM host_ptr smaller than `size` in the CL_MEM_COPY_HOST_PTR case
1 parent 47dd749 commit e250fcd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/opencl_runtime_layer.asciidoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,9 @@ returned in _errcode_ret_:
628628
in the <<memory-flags-table,Memory Flags>> table.
629629
* {CL_INVALID_BUFFER_SIZE} if _size_ is 0, or if _size_ is greater than
630630
{CL_DEVICE_MAX_MEM_ALLOC_SIZE} for all devices in _context_, or if
631-
{CL_MEM_USE_HOST_PTR} is set in _flags_ and _host_ptr_ is a pointer returned by
632-
{clSVMAlloc} and _size_ is greater than the size passed to {clSVMAlloc}.
631+
{CL_MEM_USE_HOST_PTR} or {CL_MEM_COPY_HOST_PTR} is set in _flags_ and
632+
_host_ptr_ is a pointer returned by {clSVMAlloc} and _size_ is greater than
633+
the size passed to {clSVMAlloc}.
633634
* {CL_INVALID_HOST_PTR} if _host_ptr_ is `NULL` and {CL_MEM_USE_HOST_PTR} or
634635
{CL_MEM_COPY_HOST_PTR} are set in _flags_ or if _host_ptr_ is not `NULL`
635636
but {CL_MEM_COPY_HOST_PTR} or {CL_MEM_USE_HOST_PTR} are not set in _flags_.

0 commit comments

Comments
 (0)