clarify behavior when passing the same image as a read-only and a write-only kernel argument
In the OpenCL API spec there is a restriction about passing the same image as a read-only and a write-only kernel argument:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#image-format-mapping
It is not valid to pass an image supporting writing as both a read_only image and a write_only image parameter, or to a read_write image parameter and any other image parameter.
This is documented in an odd place though. I think it would be better described in the description of clSetKernelArg.
We should also clarify what "invalid" means. Specifically, is this an error (if so, which error, and when is it generated?), or is this undefined behavior?
I'll probably start with a PR that moves the restriction to clSetKernelArg and clarifies that it is undefined behavior and we can start from there.