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

Provide symbolic name for extensions

Open kpet opened this issue 4 years ago • 1 comments

Vulkan provides preprocessor macros (e.g. VK_KHR_SURFACE_EXTENSION_NAME defined as "VK_KHR_surface"). This helps with avoiding typos in extension names that can lead to silly bugs. We should do the same. These definitions could be generated automatically from the XML.

kpet avatar Sep 10 '20 09:09 kpet

Note, we currently don't include extensions with no API changes in cl_ext.h. For example, cl_khr_3d_image_writes isn't in cl_ext.h. If we enable symbolic names for extensions, would we want to include all extension in cl_ext.h, even if it's only the symbolic name for the extension?

I think we would. I think this also means that we would want to include all extensions in the XML file also, if we're using it to generate cl_ext.h.

bashbaug avatar Oct 09 '20 04:10 bashbaug