OpenCL-Headers
OpenCL-Headers copied to clipboard
Provide symbolic name for extensions
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.
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
.