EdB <edb+m...@sigluy.net> writes: > --- > src/gallium/state_trackers/clover/api/program.cpp | 33 > +++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/api/program.cpp > b/src/gallium/state_trackers/clover/api/program.cpp > index 553bc83..086f952 100644 > --- a/src/gallium/state_trackers/clover/api/program.cpp > +++ b/src/gallium/state_trackers/clover/api/program.cpp > @@ -238,6 +238,39 @@ clCompileProgram(cl_program d_prog, cl_uint num_devs, > return e.get(); > } > > +CLOVER_API cl_program > +clLinkProgram(cl_context d_ctx, cl_uint num_devs, const cl_device_id *d_devs, > + const char *p_opts, cl_uint num_progs, const cl_program > *d_progs, > + void (*pfn_notify) (cl_program, void *), void *user_data, > + cl_int *r_errcode) try { > + auto &ctx = obj(d_ctx); > + auto devs = (d_devs ? objs(d_devs, num_devs) : > + ref_vector<device>(ctx.devices())); > + auto opts = (p_opts ? p_opts : ""); > + auto progs = objs(d_progs, num_progs); > + > + if (!pfn_notify && user_data) > + throw error(CL_INVALID_VALUE); > + > + if (any_of([&](const device &dev) { > + return !count(dev, ctx.devices()); > + }, objs<allow_empty_tag>(d_devs, num_devs))) > + throw error(CL_INVALID_DEVICE); > + > + auto prog = intrusive_ref<program>(*(new program(ctx, {}, {})));
Ah, of course, the empty initializers now made it impossible for the compiler to deduce the correct argument types for create() -- You could give it some help though like 'create<program>(ctx, ref_vector<device>(), std::vector<module>())', or feel free to add default "= {}" initializers to the last two constructor arguments so you don't need to pass them at all. > + try { > + prog().link(devs, opts, progs); > + ret_error(r_errcode, CL_SUCCESS);; Double semicolon. With these fixed this patch is: Reviewed-by: Francisco Jerez <curroje...@riseup.net> > + } catch (link_error &e) { > + ret_error(r_errcode, CL_LINK_PROGRAM_FAILURE); > + } > + > + return ret_object(prog); > +} catch (error &e) { > + ret_error(r_errcode, e); > + return NULL; > +} > + > CLOVER_API cl_int > clUnloadCompiler() { > return CL_SUCCESS; > -- > 2.5.0.rc2
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev