[OpenCL] Set KHR extensions minimum version to OpenCL 1.0 (2nd try) (#176681)
Motivation is similar to 25cfdaa4e9dc. Their spec don't specify a
required OpenCL version. Targets may expose them before OpenCL 1.2. Set
KHR extensions (depth images, mipmaps, subgroups, kernel clock, dot
product, ext_float_atomics, extended_bit_ops, cles_khr_int64) to
availability 1.0.
Changes to opencl-c.h:
* Relax header and test guards to allow extension macros whenever any
OpenCL C version is defined.
* Relax cl_khr_depth_images guard to allow cl_khr_depth_images, OpenCL
C++, or OpenCL C 2.0+, since image2d_depth_t and image2d_array_depth_t
types require that coverage.
* Guard image1d_t, image1d_array_t and image2d_array_t types with OpenCL
C++ or OpenCL C 1.2+ to match with OpenCL C spec.
Relates to https://github.com/KhronosGroup/OpenCL-CTS/pull/2376.
Update: The first attempt was reverted in #175993, but the regression
described in #175993 should be fixed in ROCm/llvm-project's opencl-c.h.
See https://github.com/llvm/llvm-project/pull/175993#issuecomment-3762586432