Tom Stellard <thomas.stell...@amd.com> writes:

> Cc: 10.5 10.4 <mesa-sta...@lists.freedesktop.org>
> ---
>  src/gallium/state_trackers/clover/api/program.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/api/program.cpp 
> b/src/gallium/state_trackers/clover/api/program.cpp
> index 60184ed..fcec1d7 100644
> --- a/src/gallium/state_trackers/clover/api/program.cpp
> +++ b/src/gallium/state_trackers/clover/api/program.cpp
> @@ -180,8 +180,12 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs,
>     validate_build_program_common(prog, num_devs, d_devs, pfn_notify, 
> user_data);
>  
>     prog.build(devs, opts);
> +   if (pfn_notify)
> +      pfn_notify(d_prog, user_data);
>     return CL_SUCCESS;
>  } catch (error &e) {
> +   if (pfn_notify)
> +      pfn_notify(d_prog, user_data);

AFAIK the notification function shouldn't be run in cases where
clBuildProgram() fails for reasons other than compilation failure, maybe
add another 'catch (const build_error &e) { ... }' block and do this in
that case only?  And most likely clCompileProgram() needs to be fixed
too?

>     if (e.get() == CL_INVALID_COMPILER_OPTIONS)
>        return CL_INVALID_BUILD_OPTIONS;

You could get rid of this conditional if you do it as I suggested.

>     if (e.get() == CL_COMPILE_PROGRAM_FAILURE)
> -- 
> 2.0.4
>
> _______________________________________________
> mesa-stable mailing list
> mesa-sta...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-stable

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to