[Mesa-dev] [RFC PATCH 17/17] clover: Handle CL_PROGRAM_IL in clGetProgramInfo

Pierre Moreau pierre.morrow at free.fr
Wed May 3 21:57:05 UTC 2017


Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---
 src/gallium/state_trackers/clover/api/program.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 57b8aedb91..5357724939 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -386,6 +386,16 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param,
       buf.as_string() = prog.source();
       break;
 
+   // FIXME valid only if OpenCL 2.1 context
+   case CL_PROGRAM_IL:
+//      if (prog.context().properties())
+//         throw error(CL_INVALID_VALUE);
+      if (prog.has_il)
+         buf.as_pointer<void>() = std::make_pair(prog.il(), prog.length());
+      else if (r_size)
+         *r_size = 0u;
+      break;
+
    case CL_PROGRAM_BINARY_SIZES:
       buf.as_vector<size_t>() = map([&](const device &dev) {
             return prog.build(dev).binary.size();
-- 
2.12.2



More information about the mesa-dev mailing list