Just adding a preprocessor #define for the extension.
Patch by Alexey Sotkin
Differential D51402
[OpenCL] Adding cl_intel_planar_yuv extension sidorovd on Aug 29 2018, 12:08 AM. Authored by
Details
Diff Detail Event TimelineComment Actions Will this extension require any Clang changes that are not possible to add using this approach for vendor extensions: If not I would suggest to add this to the header file instead. Comment Actions I'm not sure if I put pragmas in an appropriate place (I mean in the very beginning of the header).
Comment Actions @Anastasia , since there is a problem I described, wouldn't you mind if I stay with the first iteration of the patch (adding the extension to OpenCLExtensions.def) and after we'll investigate what is wrong with -cl-ext approach? Comment Actions I would prefer not to add it to Clang directly unless absolutely necessary. I think it's ok to add this in the header for now as is, but then investigate how we can add an architecture guard later. Please, could you just move the testing into test/Headers/opencl-c-header.cl, because test/SemaOpenCL/extension-version.cl is for Clang built in extensions. |