mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 20:30:12 +01:00
clover: Handle NULL devs argument in clBuildProgram
If devs is NULL, then the kernel should be compiled for all devices associated with the program.
This commit is contained in:
parent
c6bb41c28b
commit
1d21bd057a
1 changed files with 10 additions and 5 deletions
|
|
@ -142,12 +142,17 @@ 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);
|
||||
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);
|
||||
}
|
||||
|
||||
prog->build({ devs, devs + count });
|
||||
return CL_SUCCESS;
|
||||
|
||||
} catch (error &e) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue