You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the OpenCL teleconference on May 3rd we were discussing whether it is possible to create an image from a buffer and to pass a non-NULL host_ptr while creating the image - see related comment here: #777 (comment)
I believe this case is disallowed by the current spec (v3.0.10) although it is not directly disallowed. Specifically, for clCreateImage we have the following error conditions:
CL_INVALID_HOST_PTR if [...] host_ptr is not NULL but CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR are not set in flags.
CL_INVALID_VALUE if an image is being created from another memory object (buffer or image) under one of the following circumstances: [...] 3) flags specifies CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR or CL_MEM_COPY_HOST_PTR.
Because a non-NULL host_ptr requires either CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR, and because creating an image from another memory object specifically disallows CL_MEM_USE_HOST_PTR and CL_MEM_COPY_HOST_PTR, it is impossible to create an image from a buffer and have a non-NULL host_ptr.
Should we find a way to document this more clearly?
The text was updated successfully, but these errors were encountered:
In the OpenCL teleconference on May 3rd we were discussing whether it is possible to create an image from a buffer and to pass a non-NULL host_ptr while creating the image - see related comment here: #777 (comment)
I believe this case is disallowed by the current spec (v3.0.10) although it is not directly disallowed. Specifically, for clCreateImage we have the following error conditions:
Because a non-NULL host_ptr requires either CL_MEM_COPY_HOST_PTR or CL_MEM_USE_HOST_PTR, and because creating an image from another memory object specifically disallows CL_MEM_USE_HOST_PTR and CL_MEM_COPY_HOST_PTR, it is impossible to create an image from a buffer and have a non-NULL host_ptr.
Should we find a way to document this more clearly?
The text was updated successfully, but these errors were encountered: