diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/clover/api/program.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index b81ce69652f..8d9d3ac62d5 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -232,6 +232,17 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param, prog.devices()); break; + case CL_PROGRAM_NUM_KERNELS: + buf.as_scalar<cl_uint>() = prog.symbols().size(); + break; + + case CL_PROGRAM_KERNEL_NAMES: + buf.as_string() = fold([](const std::string &a, const module::symbol &s) { + return ((a.empty() ? "" : a + ";") + + std::string(s.name.begin(), s.name.size())); + }, std::string(), prog.symbols()); + break; + default: throw error(CL_INVALID_VALUE); } |