Page MenuHomePhabricator

[OpenCL] Accept .rgba in OpenCL 3.0

Authored by svenvh on Apr 6 2021, 9:41 AM.



The .rgba vector component accessors are supported in OpenCL C 3.0.

Previously, the diagnostic would check OpenCLVersion for version 2.2
(value 220) and report those accessors are an OpenCL 2.2 feature.
However, there is no "OpenCL C version 2.2", so change the check and
diagnostic text to 3.0 only.

A spurious OpenCLVersion argument was passed into the diagnostic;
remove that.

Diff Detail

Event Timeline

svenvh created this revision.Apr 6 2021, 9:41 AM
svenvh requested review of this revision.Apr 6 2021, 9:41 AM
Anastasia accepted this revision.Apr 6 2021, 10:49 AM

LGTM! Thanks!

The code formating check reported an issue though...

This revision is now accepted and ready to land.Apr 6 2021, 10:49 AM

Thanks for working on this! Looks good to me in general. I have a small comment.


Did you forget to check for OpenCL first (S.getLangOpts().OpenCL)?

svenvh added a comment.Apr 7 2021, 2:09 AM

The code formating check reported an issue though...

My bad, will fix before committing.


Good point! I thought we didn't need it so I left it out, but when thinking about it again, I believe we do need it, because this code path is not exclusive to OpenCL.

I will add the check back before committing.

This revision was landed with ongoing or failed builds.Apr 12 2021, 1:30 AM
This revision was automatically updated to reflect the committed changes.