| // Copyright 2017-2020 The Khronos Group. This work is licensed under a |
| // Creative Commons Attribution 4.0 International License; see |
| // http://creativecommons.org/licenses/by/4.0/ |
| |
| [[required-capabilities]] |
| == Required Capabilities |
| |
| [[required-capabilities-1.0]] |
| === SPIR-V 1.0 |
| |
| An OpenCL environment that supports SPIR-V 1.0 must support SPIR-V 1.0 |
| modules that declare the following capabilities: |
| |
| * *Addresses* |
| * *Float16Buffer* |
| * *Int64* |
| ** For Full Profile devices. |
| * *Int16* |
| * *Int8* |
| * *Kernel* |
| * *Linkage* |
| * *Vector16* |
| * *DeviceEnqueue* |
| ** For OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, or OpenCL 3.0 devices supporting Device-Side Enqueue (where {CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES} is not `0`). |
| * *GenericPointer* |
| ** For OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, or OpenCL 3.0 devices supporting the Generic Address Space (where {CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT} is {CL_TRUE}). |
| * *Groups* |
| ** For OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, or OpenCL 3.0 devices supporting Subgroups (where {CL_DEVICE_MAX_NUM_SUB_GROUPS} is not `0`) or Work Group Collective Functions (where {CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT} is {CL_TRUE}). |
| * *Pipes* |
| ** For OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, or OpenCL 3.0 devices supporting Pipes (where {CL_DEVICE_PIPE_SUPPORT} is {CL_TRUE}). |
| * *ImageBasic* |
| ** For devices supporting Images (where {CL_DEVICE_IMAGE_SUPPORT} is {CL_TRUE}) |
| * *Float64* |
| ** For devices supporting Double Precision Floating-Point (where {CL_DEVICE_DOUBLE_FP_CONFIG} is not `0`) |
| |
| If the OpenCL environment supports the *ImageBasic* capability, then |
| the following capabilities must also be supported: |
| |
| * *LiteralSampler* |
| * *Sampled1D* |
| * *Image1D* |
| * *SampledBuffer* |
| * *ImageBuffer* |
| * *ImageReadWrite* |
| ** For OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, or OpenCL 3.0 devices supporting Read-Write Images (where {CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS} is not `0`) |
| |
| [[required-capabilities-1.1]] |
| === SPIR-V 1.1 |
| |
| An OpenCL environment supporting SPIR-V 1.1 must support SPIR-V 1.1 |
| modules that declare the capabilities required for SPIR-V 1.0 modules, |
| above. |
| |
| In addition, an OpenCL environment consuming SPIR-V 1.1 must support |
| SPIR-V 1.1 modules that declare the following capabilities: |
| |
| * *SubgroupDispatch* |
| ** For OpenCL 2.2 devices, or OpenCL 3.0 devices supporting Subgroups (where {CL_DEVICE_MAX_NUM_SUB_GROUPS} is not `0`) |
| // TODO: Do we need a device query for pipe storage? |
| // We do not currently expose pipe storage in OpenCL C. |
| * *PipeStorage* |
| ** For OpenCL 2.2 devices. |
| // Removing these for now, see: |
| // https://github.com/KhronosGroup/OpenCL-Docs/issues/190 |
| // https://github.com/KhronosGroup/OpenCL-Docs/pull/191 |
| // * *Initializer* (OpenCL 2.2 and Newer) |
| // * *Finalizer* (OpenCL 2.2 and Newer) |
| |
| [[required-capabilities-1.2]] |
| === SPIR-V 1.2 |
| |
| An OpenCL environment supporting SPIR-V 1.2 must support SPIR-V 1.2 |
| modules that declare the capabilities required for SPIR-V 1.1 modules, |
| above. |
| |
| SPIR-V 1.2 does not add any new required capabilities. |