[Mesa-dev] [PATCH 1/2] clover: add clCreateProgramWithBuiltInKernels
EdB
edb+mesa at sigluy.net
Sun Jul 27 14:07:38 PDT 2014
---
src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +-
src/gallium/state_trackers/clover/api/program.cpp | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/clover/api/dispatch.cpp b/src/gallium/state_trackers/clover/api/dispatch.cpp
index 488e654..43b5537 100644
--- a/src/gallium/state_trackers/clover/api/dispatch.cpp
+++ b/src/gallium/state_trackers/clover/api/dispatch.cpp
@@ -121,7 +121,7 @@ namespace clover {
clRetainDevice,
clReleaseDevice,
clCreateImage,
- NULL, // clCreateProgramWithBuiltInKernels
+ clCreateProgramWithBuiltInKernels,
NULL, // clCompileProgram
NULL, // clLinkProgram
NULL, // clUnloadPlatformCompiler
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index a14baa3..7914528 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -106,6 +106,25 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
return NULL;
}
+CLOVER_API cl_program
+clCreateProgramWithBuiltInKernels(cl_context d_ctx, cl_uint num_devs,
+ const cl_device_id *d_devs,
+ const char *kernel_names,
+ cl_int *r_errcode) try {
+ obj(d_ctx);
+ objs(d_devs, num_devs);
+
+ // none of the supported devices
+ // have buildin kernel
+ ret_error(r_errcode, CL_INVALID_VALUE);
+ return NULL;
+
+} catch (error &e) {
+ ret_error(r_errcode, e);
+ return NULL;
+}
+
+
CLOVER_API cl_int
clRetainProgram(cl_program d_prog) try {
obj(d_prog).retain();
--
2.0.0
More information about the mesa-dev
mailing list