This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t variants are OpenCL-1.2+, mark them as such
ClosedPublic

Authored by lebedev.ri on Jan 13 2019, 2:53 AM.

Details

Summary

Refer to [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=242 | 6.11.13.2 Built-in Image Functions ]],
and [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=306 | 9.6.8 Image Read and Write Functions ]] of the OpenCL 1.1 spec.

  • There is no mention of image1d_array_t and image2d_array_t anywhere in the OpenCL 1.1 spec.
  • All the read_image{f,i,ui,h}() functions, as of OpenCL 1.1 spec, have a second required parameter sampler_t sampler

Should have prevented the following regression:
https://redmine.darktable.org/issues/12493

Diff Detail

Repository
rL LLVM

Event Timeline

lebedev.ri created this revision.Jan 13 2019, 2:53 AM
Anastasia accepted this revision.Jan 15 2019, 3:15 AM

LGTM! Overall I feel we need to find some way to test the header better...

This revision is now accepted and ready to land.Jan 15 2019, 3:15 AM

LGTM!

Thank you for the review.

Overall I feel we need to find some way to test the header better...

Yeah, i will not be hugely surprised if there is a bunch more things like this here.

This revision was automatically updated to reflect the committed changes.