OpenCL-Headers icon indicating copy to clipboard operation
OpenCL-Headers copied to clipboard

Extension Error Codes in cl.h

Open bashbaug opened this issue 6 years ago • 1 comments

cl.h currently includes error codes for:

  • CL_INVALID_GL_OBJECT
  • CL_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?

bashbaug avatar Jul 09 '19 20:07 bashbaug

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?

alycm avatar Sep 02 '19 17:09 alycm