-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guard provisional extensions with an opt-in define #268
base: main
Are you sure you want to change the base?
guard provisional extensions with an opt-in define #268
Conversation
Generally looks good to me. I agree this should be an opt-in. One minor comment on the name, I think we probably want a verb in there. A couple of ideas that come to mind:
|
Vulkan uses How closely do we want to align? Should we use |
"Beta" is maybe more intuitive for people not familiar with our terminology but all our documents and processes use "provisional". I think I'd personally favour consistency and use "provisional". If we were to use "beta", we would need to define somewhere that "beta" means "provisional" :). |
add testing for provisional define
I changed the name of the define to I also added some some amount of testing with the define set. Currently, I have only added this for OpenCL 3.0 builds, to avoid doubling the number of test configurations. My thinking is: most provisional extensions will be written against OpenCL 3.0, and OpenCL 3.0 will have all OpenCL features enabled so it'd be most likely to expose issues. It's easy to change this, though, if other testing is desired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, we should update the root README.md
with how to opt-in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we extend the tests themselves to obverse the effects of the macro, for example something like this intests/test_ext_headers.c
int provisional_macro(void) {
#ifdef CL_ENABLE_PROVISIONAL_EXTENSIONS
printf("%s is available\n", CL_KHR_COMMAND_BUFFER_EXTENSION_NAME);
#else
#ifdef CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
assert(false && "cl_khr_command_buffer macros should not be defined");
return 1;
#endif // CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
#endif // CL_ENABLE_PROVISIONAL_EXTENSIONS
return 0;
}
fixes #247
Wraps provisional extensions in an opt-in define so applications that do not use provisional extensions do not get broken by non-backwards compatible changes.
Notes:
provisional="true"
line in the XML file.CL_PROVISIONAL_EXTENSIONS
, but it's trivial to change this if desired.