summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vesely <jano.vesely@gmail.com>2016-04-28 21:54:50 -0400
committerJan Vesely <jan.vesely@rutgers.edu>2016-05-06 11:38:27 -0400
commit5ddb65a0dd5e05769d9d23adf97289208e5846cc (patch)
tree46e91d69c6058f5b477f0558eb4b2ad95053870c
parent718a888ed9a5e210b0bd965e1ca3729e5e3416cd (diff)
cl: Fix cl_khr_fp64 checks
v2: fix sizeof test v3: OCL1.0 is OK with extension : enable Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
-rwxr-xr-xtests/cl/program/build/scalar-data-types.cl5
-rw-r--r--tests/cl/program/execute/sizeof.cl4
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/cl/program/build/scalar-data-types.cl b/tests/cl/program/build/scalar-data-types.cl
index 00693f56b..a15f51f2d 100755
--- a/tests/cl/program/build/scalar-data-types.cl
+++ b/tests/cl/program/build/scalar-data-types.cl
@@ -21,8 +21,9 @@ kernel void test(global int* out) {
uintptr_t uit;
//half h; // Can be only used as a pointer to a buffer
-// Needs cl_khr_fp64 or OpenCL C 1.2
-#if __OPENCL_C_VERSION__ >= 120
+// Needs cl_khr_fp64
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
double d;
double* d1;
#endif
diff --git a/tests/cl/program/execute/sizeof.cl b/tests/cl/program/execute/sizeof.cl
index 744a59c11..21b9c6bd5 100644
--- a/tests/cl/program/execute/sizeof.cl
+++ b/tests/cl/program/execute/sizeof.cl
@@ -100,7 +100,9 @@ kernel void so(global int* out) {
out[i++] = sizeof(half);
-#if __OPENCL_C_VERSION__ >= 120
+// Needs cl_khr_fp64
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
out[i++] = sizeof(double);
out[i++] = sizeof(double2);
out[i++] = sizeof(double3);