-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Another change change in the generated headers PR (KhronosGroup/OpenCL-Headers#161) is to add a function declaration for each of the new APIs. Previously, this was done inconsistently and only for some extensions. Example:
extern CL_API_ENTRY cl_command_queue CL_API_CALL
clCreateCommandQueueWithPropertiesKHR(
cl_context context,
cl_device_id device,
const cl_queue_properties_khr* properties,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;While it doesn't happen often in the CTS tests, the "media_sharing" test declares function pointers with the same name as the function APIs, which conflicts with the function declaration in the headers.
clGetDeviceIDsFromDX9MediaAdapterKHR_fn clGetDeviceIDsFromDX9MediaAdapterKHR = NULL;
clCreateFromDX9MediaSurfaceKHR_fn clCreateFromDX9MediaSurfaceKHR = NULL;
clEnqueueAcquireDX9MediaSurfacesKHR_fn clEnqueueAcquireDX9MediaSurfacesKHR = NULL;
clEnqueueReleaseDX9MediaSurfacesKHR_fn clEnqueueReleaseDX9MediaSurfacesKHR = NULL;We should think about how to solve this problem before merging the generated headers PR. The simplest solution is to name the function pointers differently, such as with a prefix or suffix. Alternatively, we can look at a solution that provides definitions of the extension APIs as declared in the headers, in which case the calls to these functions can remain unchanged.