[Mesa-stable] [PATCH] clover: Call clBuildProgram() notification function when build completes
Francisco Jerez
currojerez at riseup.net
Tue Mar 24 14:34:34 PDT 2015
Tom Stellard <thomas.stellard at amd.com> writes:
> Cc: 10.5 10.4 <mesa-stable at 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-stable at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-stable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20150324/ceaf19d2/attachment.sig>
More information about the mesa-stable
mailing list