diff options
author | Tom Stellard <[email protected]> | 2014-11-03 09:14:01 -0500 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-11-03 10:35:07 -0500 |
commit | 263eb7fa39a16bcce7d64a4b8343c6adbc3e916c (patch) | |
tree | e434c99098a073f0fac69e821184a3d9b24c0279 /src/gallium/state_trackers/clover/api | |
parent | bfd453f94256a674194bc5f273db2260821c6c18 (diff) |
clover: Fix clBuildProgram piglit regression
Should trigger CL_INVALID_VALUE if device_list is NULL and num_devices
is greater than zero.
Introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563
Reported by: EdB
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r-- | src/gallium/state_trackers/clover/api/program.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 64c4a43f4b3..3a6c0546153 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -27,7 +27,7 @@ using namespace clover; namespace { void validate_build_program_common(const program &prog, cl_uint num_devs, - const ref_vector<device> &devs, + const cl_device_id *d_devs, void (*pfn_notify)(cl_program, void *), void *user_data) { @@ -39,7 +39,7 @@ namespace { if (any_of([&](const device &dev) { return !count(dev, prog.context().devices()); - }, devs)) + }, objs<allow_empty_tag>(d_devs, num_devs))) throw error(CL_INVALID_DEVICE); } } @@ -177,7 +177,7 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs, ref_vector<device>(prog.context().devices())); auto opts = (p_opts ? p_opts : ""); - validate_build_program_common(prog, num_devs, devs, pfn_notify, user_data); + validate_build_program_common(prog, num_devs, d_devs, pfn_notify, user_data); prog.build(devs, opts); return CL_SUCCESS; @@ -200,7 +200,7 @@ clCompileProgram(cl_program d_prog, cl_uint num_devs, auto opts = (p_opts ? p_opts : ""); header_map headers; - validate_build_program_common(prog, num_devs, devs, pfn_notify, user_data); + validate_build_program_common(prog, num_devs, d_devs, pfn_notify, user_data); if (bool(num_headers) != bool(header_names)) throw error(CL_INVALID_VALUE); |