Tom Stellard <[email protected]> writes: > If devs is NULL, then the kernel should be compiled for all devices > associated with the program's context. > --- > src/gallium/state_trackers/clover/api/program.cpp | 16 ++++++++++------ > 1 files changed, 10 insertions(+), 6 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/api/program.cpp > b/src/gallium/state_trackers/clover/api/program.cpp > index e874c51..e863e00 100644 > --- a/src/gallium/state_trackers/clover/api/program.cpp > +++ b/src/gallium/state_trackers/clover/api/program.cpp > @@ -142,12 +142,16 @@ clBuildProgram(cl_program prog, cl_uint count, const > cl_device_id *devs, > (!pfn_notify && user_data)) > throw error(CL_INVALID_VALUE); > > - if (any_of([&](const cl_device_id dev) { > - return !prog->ctx.has_device(dev); > - }, devs, devs + count)) > - throw error(CL_INVALID_DEVICE); > - > - prog->build({ devs, devs + count }); > + if (devs) { > + if (any_of([&](const cl_device_id dev) { > + return !prog->ctx.has_device(dev); > + }, devs, devs + count)) > + throw error(CL_INVALID_DEVICE); > + > + prog->build({ devs, devs + count }); > + } else { > + prog->build({ prog->ctx.devs.begin(), prog->ctx.devs.end() });
How about 'prog->build(prog->ctx.devs);'?
The spec doesn't seem very clear on what should happen in that case, but
isn't this wrong for programs created with 'clCreateProgramWithBinary'
that are associated with a specific subset of devices from the program
context?
> + }
> return CL_SUCCESS;
>
> } catch (error &e) {
pgpW5gLbc6RdU.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
