Skip to content

CL: Support "weird but allowed" cases with pointers

Boris Brezillon requested to merge ms/cl-kernel-ptr-args into msclc-d3d12

The first thing this series addresses is the NULL pointer argument case, which is a perfectly valid and understood case.

The second it adds support for is returning pointer values back to the C caller. That's allowed by the spec, but the returned values have no meaning and can only be passed back to the same CL kernel. There's no standard way to form cl_mem objects out of those raw pointers (possible in theory in our case since we can extract the UAV/CBV ids and an offset inside those CBVs, but the CL spec doesn't have an API for that AFAICT).

/cc @jenatali @daniels @kusma

Merge request reports