Re: [Piglit] [PATCH v2] cl: Fix cl_khr_fp64 checks
On Fri, 2016-05-06 at 13:38 +0200, Serge Martin wrote: > On Thursday 28 April 2016 22:22:06 Jan Vesely wrote: > > > > v2: fix sizeof test > > > > Signed-off-by: Jan Vesely> > --- > > tests/cl/program/build/scalar-data-types.cl | 5 +++-- > > tests/cl/program/execute/sizeof.cl | 4 +++- > > 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 > > 00693f5..09fd15f 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 : require > 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 744a59c..aa78590 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 : require > enable > > with that fixed : > Reviewed-by Serge Martin thanks. I went for ocl1.0 compatibility, but I guess the online docs are too old [0]. Fixed locally and pushed as 5ddb65. Jan [0] https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/EXTENSIO N.html > > - Serge > > > > > out[i++] = sizeof(double); > > out[i++] = sizeof(double2); > > out[i++] = sizeof(double3); > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2] cl: Fix cl_khr_fp64 checks
On Thursday 28 April 2016 22:22:06 Jan Vesely wrote: > v2: fix sizeof test > > Signed-off-by: Jan Vesely> --- > tests/cl/program/build/scalar-data-types.cl | 5 +++-- > tests/cl/program/execute/sizeof.cl | 4 +++- > 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 00693f5..09fd15f 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 : require 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 744a59c..aa78590 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 : require enable with that fixed : Reviewed-by Serge Martin - Serge > out[i++] = sizeof(double); > out[i++] = sizeof(double2); > out[i++] = sizeof(double3); ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2] cl: Fix cl_khr_fp64 checks
v2: fix sizeof test Signed-off-by: Jan Vesely--- tests/cl/program/build/scalar-data-types.cl | 5 +++-- tests/cl/program/execute/sizeof.cl | 4 +++- 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 00693f5..09fd15f 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 : require double d; double* d1; #endif diff --git a/tests/cl/program/execute/sizeof.cl b/tests/cl/program/execute/sizeof.cl index 744a59c..aa78590 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 : require out[i++] = sizeof(double); out[i++] = sizeof(double2); out[i++] = sizeof(double3); -- 2.7.4 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit