[Beignet] Limit get_program_global_data() calls to OpenCL 2.0

Yang, Rong R rong.r.yang at intel.com
Thu Mar 23 07:24:51 UTC 2017


The workaround LGTM, pushed, thanks.

BTW, please add the signed-off-by information by `git format-patch -s` next time.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Jan Beich
> Sent: Thursday, March 16, 2017 18:13
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] Limit get_program_global_data() calls to OpenCL 2.0
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217635
> ---
>  src/cl_program.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/cl_program.c b/src/cl_program.c index 363aed5d..bb96d98f
> 100644
> --- a/src/cl_program.c
> +++ b/src/cl_program.c
> @@ -675,7 +675,8 @@ cl_program_build(cl_program p, const char *options)
>      memcpy(p->bin + copyed, interp_kernel_get_code(opaque), sz);
>      copyed += sz;
>    }
> -  if ((err = get_program_global_data(p)) != CL_SUCCESS)
> +  uint32_t ocl_version =
> + interp_kernel_get_ocl_version(interp_program_get_kernel(p->opaque,
> + 0));  if (ocl_version >= 200 && (err = get_program_global_data(p)) !=
> + CL_SUCCESS)
>      goto error;
> 
>    p->is_built = 1;
> @@ -784,7 +785,8 @@ cl_program_link(cl_context            context,
>      copyed += sz;
>    }
> 
> -  if ((err = get_program_global_data(p)) != CL_SUCCESS)
> +  uint32_t ocl_version =
> + interp_kernel_get_ocl_version(interp_program_get_kernel(p->opaque,
> + 0));  if (ocl_version >= 200 && (err = get_program_global_data(p)) !=
> + CL_SUCCESS)
>      goto error;
> 
>  done:
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list