aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2015-07-29 23:43:49 +0000
committerGil Pitney <gil.pitney@linaro.org>2015-07-29 23:43:49 +0000
commit5fe461416ab30b6af50a24d638b30b5a8924ffac (patch)
treee3b8f7bd2cc8702500ced031f95509f965b633ef
parent668bdd17cadc838a8bc165a0f222e31c7b6777a7 (diff)
Explicitly return CL_INVALID_VALUE for CL_KERNEL_GLOBAL_WORK_SIZE caseshamrock_v1.2ocl_1_2_fixes
Per the v1.2 spec, for clGetKernelWorkGroupInfo(), CL_KERNEL_GLOBAL_WORK_SIZE: "If device is not a custom device or kernel is not a built-in kernel, clGetKernelArgInfo returns the error CL_INVALID_VALUE." Since the CPU is not a custom device, and has no built-in kernels, then the return value of CL_INVALID_VALUE is correct. This reverts commit 668bdd17cadc838a8bc165a0f222e31c7b6777a7, but as a result may cause an error in piglit testing, which that commit was meant to resolve. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r--src/core/kernel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/kernel.cpp b/src/core/kernel.cpp
index f84854a..05b276e 100644
--- a/src/core/kernel.cpp
+++ b/src/core/kernel.cpp
@@ -771,7 +771,6 @@ cl_int Kernel::workGroupInfo(DeviceInterface *device,
switch (param_name)
{
- case CL_KERNEL_GLOBAL_WORK_SIZE:
case CL_KERNEL_WORK_GROUP_SIZE:
SIMPLE_ASSIGN(size_t, dep.kernel->workGroupSize());
break;
@@ -799,6 +798,9 @@ cl_int Kernel::workGroupInfo(DeviceInterface *device,
SIMPLE_ASSIGN(size_t, dep.kernel->preferredWorkGroupSizeMultiple());
break;
+ case CL_KERNEL_GLOBAL_WORK_SIZE:
+ // Per the v1.2 spec, must return CL_INVALID_VALUE if *not* a custom device or
+ // built-in kernel (we are neither):
default:
return CL_INVALID_VALUE;
}