summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/clover/api/dispatch.cpp2
-rw-r--r--src/gallium/state_trackers/clover/api/program.cpp22
2 files changed, 23 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/dispatch.cpp b/src/gallium/state_trackers/clover/api/dispatch.cpp
index 488e65491bf..43b5537106a 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 a14baa30e06..293a61fdfa8 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -106,6 +106,28 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
return NULL;
}
+CLOVER_API cl_program
+clCreateProgramWithBuiltInKernels(cl_context d_ctx, cl_uint n,
+ const cl_device_id *d_devs,
+ const char *kernel_names,
+ cl_int *r_errcode) try {
+ auto &ctx = obj(d_ctx);
+ auto devs = objs(d_devs, n);
+
+ if (any_of([&](const device &dev) {
+ return !count(dev, ctx.devices());
+ }, devs))
+ throw error(CL_INVALID_DEVICE);
+
+ // No currently supported built-in kernels.
+ throw error(CL_INVALID_VALUE);
+
+} catch (error &e) {
+ ret_error(r_errcode, e);
+ return NULL;
+}
+
+
CLOVER_API cl_int
clRetainProgram(cl_program d_prog) try {
obj(d_prog).retain();