[Mesa-dev] [PATCH v4 18/20] clover/api: Implement CL_DEVICE_IL_VERSION

Karol Herbst kherbst at redhat.com
Thu Mar 8 09:41:22 UTC 2018


Reviewed-by: Karol Herbst <kherbst at redhat.com>

On Thu, Mar 8, 2018 at 1:21 AM, Pierre Moreau <pierre.morrow at free.fr> wrote:
> Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> ---
>
> Notes:
>     Changes in v4: Use the core define instead of the extension one (Karol Herbst)
>
>     v3: Throw an exception if the cl_khr_il_program extension is not supported
>         (Francisco Jerez)
>
>  src/gallium/state_trackers/clover/api/device.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
> index 4e274c5005..ac6e4e0185 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -333,6 +333,13 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
>        buf.as_string() = dev.supported_extensions();
>        break;
>
> +   case CL_DEVICE_IL_VERSION:
> +      if (dev.supported_extensions().find("cl_khr_il_program") == std::string::npos)
> +         throw error(CL_INVALID_VALUE);
> +      buf.as_string() = std::string("SPIR-V_1.0");
> +
> +      break;
> +
>     case CL_DEVICE_PLATFORM:
>        buf.as_scalar<cl_platform_id>() = desc(dev.platform);
>        break;
> --
> 2.16.2
>


More information about the mesa-dev mailing list