diff options
author | Tom Stellard <[email protected]> | 2012-11-27 21:57:15 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-12-13 19:22:44 +0000 |
commit | c68babfc3c7b65dd53697528781bd6b6186f5190 (patch) | |
tree | 5c5546488db700d88940510b166986f8d7be1ff2 /src/gallium/state_trackers/clover/api | |
parent | 7f71efcf7a8eace124e71ca72c86d4c2bdc8042d (diff) |
clover: Add support for compiler flags
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 74de840d3df..06f96f1845c 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -142,15 +142,18 @@ clBuildProgram(cl_program prog, cl_uint count, const cl_device_id *devs, (!pfn_notify && user_data)) throw error(CL_INVALID_VALUE); + if (!opts) + opts = ""; + 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 }); + prog->build({ devs, devs + count }, opts); } else { - prog->build(prog->ctx.devs); + prog->build(prog->ctx.devs, opts); } return CL_SUCCESS; |