OpenCL-Headers
OpenCL-Headers copied to clipboard
Extension Error Codes in cl.h
cl.h currently includes error codes for:
CL_INVALID_GL_OBJECTCL_INVALID_MIP_LEVEL
These error codes are defined by extensions though, and are not in the core API specification.
Questions are:
- Should they be in cl_ext.h instead?
- Should they have a KHR suffix?
The functions that can return those error codes are in cl_gl.h so perhaps they should be defined there.
As for a KHR suffix, in theory yes. But CL_INVALID_GL_OBJECT (without _KHR) goes all the way back to OpenCL 1.0, and CL_INVALID_MIP_LEVEL back to 1.1 (1.0 had CL_INVALID_MIPLEVEL).
A GitHub search shows many uses (though the vast majority seem to be error code pretty printers).
Maybe the extension specification should be updated to use KHR but the headers keep both versions?