summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-02-13 13:08:08 -0500
committerTom Stellard <thomas.stellard@amd.com>2012-02-14 15:16:23 -0500
commit3c8f69e8d6bc54932654d60f6135c2090ca6960f (patch)
tree4be909215239fbe48f124bc58075a99c2a07dfd9
parent7a5333527d7751548911fe2b21fe01d6ac8ab83c (diff)
clover: clEnqueueNDRangeKernel() throw an error for missing implementation
-rw-r--r--src/gallium/state_trackers/clover/core/kernel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
index 97efb98929e..a1932cf112f 100644
--- a/src/gallium/state_trackers/clover/core/kernel.cpp
+++ b/src/gallium/state_trackers/clover/core/kernel.cpp
@@ -233,6 +233,12 @@ _cl_kernel::exec_context::bind(clover::kernel *kern1,
#endif
cs.req_local_mem = mem_local;
cs.req_input_mem = input.size();
+ if (!q->pipe->create_compute_state) {
+ /* I think the correct way to handle a missing implementation is
+ * to not return a deviceID in clGetDeviceIDs(), but for now we will
+ * treat this as CL_OUT_OF_RESOURCES. */
+ throw error(CL_OUT_OF_RESOURCES);
+ }
st = q->pipe->create_compute_state(q->pipe, &cs);
}