Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
Niels Ole Salscheiderwrites: > On Wednesday, 31 August 2016, 15:53:05 CEST, Serge Martin wrote: >> On Wednesday 31 August 2016 12:39:23 Vedran Miletić wrote: >> > On 08/28/2016 04:42 PM, Niels Ole Salscheider wrote: >> > > This is required by the OpenCL standard. >> > > >> > > Signed-off-by: Niels Ole Salscheider >> > >> > Reviewed-by: Vedran Miletić >> > >> > Good catch. Do we miss more defines from [1]? >> >> I think __IMAGE_SUPPORT__ and __EMBEDDED_PROFILE__ should be managed by >> Clover too but none off them would be ever define wit our current feature >> level, so this is ok. >> >> I think __ENDIAN_LITTLE__ is missing. >> >> Anyway, adding some piglit tests would be nice :) > > I have posted a patch with a piglit test. Can somebody push this for me? > Pushed, thanks! >> Serge >> >> > Regards, >> > Vedran >> > >> > [1] >> > https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/preprocessorDir >> > ectives.html> >> > > --- >> > > >> > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ >> > > 1 file changed, 3 insertions(+) >> > > >> > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp >> > > b/src/gallium/state_trackers/clover/llvm/invocation.cpp index >> > > 5490d72..b5e8b52 100644 >> > > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp >> > > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp >> > > @@ -153,6 +153,9 @@ namespace { >> > > >> > >// Add libclc include >> > >c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); >> > > >> > > + // Add definition for the OpenCL version >> > > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); >> > > + >> > > >> > >// clc.h requires that this macro be defined: >> > >c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_speci >> > >fiers"); >> > >c.getPreprocessorOpts().addRemappedFile( > > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
On Wednesday, 31 August 2016, 15:53:05 CEST, Serge Martin wrote: > On Wednesday 31 August 2016 12:39:23 Vedran Miletić wrote: > > On 08/28/2016 04:42 PM, Niels Ole Salscheider wrote: > > > This is required by the OpenCL standard. > > > > > > Signed-off-by: Niels Ole Salscheider> > > > Reviewed-by: Vedran Miletić > > > > Good catch. Do we miss more defines from [1]? > > I think __IMAGE_SUPPORT__ and __EMBEDDED_PROFILE__ should be managed by > Clover too but none off them would be ever define wit our current feature > level, so this is ok. > > I think __ENDIAN_LITTLE__ is missing. > > Anyway, adding some piglit tests would be nice :) I have posted a patch with a piglit test. Can somebody push this for me? > Serge > > > Regards, > > Vedran > > > > [1] > > https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/preprocessorDir > > ectives.html> > > > --- > > > > > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > b/src/gallium/state_trackers/clover/llvm/invocation.cpp index > > > 5490d72..b5e8b52 100644 > > > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > @@ -153,6 +153,9 @@ namespace { > > > > > >// Add libclc include > > >c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); > > > > > > + // Add definition for the OpenCL version > > > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); > > > + > > > > > >// clc.h requires that this macro be defined: > > >c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_speci > > >fiers"); > > >c.getPreprocessorOpts().addRemappedFile( ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
On Wed, 2016-08-31 at 15:53 +0200, Serge Martin wrote: > On Wednesday 31 August 2016 12:39:23 Vedran Miletić wrote: > > > > On 08/28/2016 04:42 PM, Niels Ole Salscheider wrote: > > > > > > This is required by the OpenCL standard. > > > > > > Signed-off-by: Niels Ole Salscheider> > e.de> > > Reviewed-by: Vedran Miletić > > > > Good catch. Do we miss more defines from [1]? > I think __IMAGE_SUPPORT__ and __EMBEDDED_PROFILE__ should be managed > by Clover > too but none off them would be ever define wit our current feature > level, > so this is ok. __IMAGE_SUPPORT__ should be based on dev.image_support() return value. Zoltan worked on image support, althought the piglit tests still fail for me (r600). Though clang might be a better place for this one. I'm not sure about __EMBEDDED_PROFILE__. again, clang might be a better place to handle it (since it will change how libclc is compiled), I haven't checked all the features it enables/disables. > > I think __ENDIAN_LITTLE__ is missing. That should be handled be clang, and there's a patch for it: https://reviews.llvm.org/D23953 > > Anyway, adding some piglit tests would be nice :) Those should be pretty straghtforward :) Jan > > Serge > > > > > > > Regards, > > Vedran > > > > [1] > > https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/preproce > > ssorDirectives.html > > > > > > > > --- > > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git > > > a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > b/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > index 5490d72..b5e8b52 100644 > > > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > > > @@ -153,6 +153,9 @@ namespace { > > > // Add libclc include > > > c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); > > > > > > + // Add definition for the OpenCL version > > > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=11 > > > 0"); > > > + > > > // clc.h requires that this macro be defined: > > > c.getPreprocessorOpts().addMacroDef("cl_clang_storage_clas > > > s_specifiers"); > > > c.getPreprocessorOpts().addRemappedFile( > > > > > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
On Wednesday 31 August 2016 12:39:23 Vedran Miletić wrote: > On 08/28/2016 04:42 PM, Niels Ole Salscheider wrote: > > This is required by the OpenCL standard. > > > > Signed-off-by: Niels Ole Salscheider> Reviewed-by: Vedran Miletić > > Good catch. Do we miss more defines from [1]? I think __IMAGE_SUPPORT__ and __EMBEDDED_PROFILE__ should be managed by Clover too but none off them would be ever define wit our current feature level, so this is ok. I think __ENDIAN_LITTLE__ is missing. Anyway, adding some piglit tests would be nice :) Serge > > Regards, > Vedran > > [1] > https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/preprocessorDirectives.html > > > --- > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > b/src/gallium/state_trackers/clover/llvm/invocation.cpp > > index 5490d72..b5e8b52 100644 > > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > > @@ -153,6 +153,9 @@ namespace { > >// Add libclc include > >c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); > > > > + // Add definition for the OpenCL version > > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); > > + > >// clc.h requires that this macro be defined: > > > > c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers"); > >c.getPreprocessorOpts().addRemappedFile( > > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
On 08/28/2016 04:42 PM, Niels Ole Salscheider wrote: > This is required by the OpenCL standard. > > Signed-off-by: Niels Ole SalscheiderReviewed-by: Vedran Miletić Good catch. Do we miss more defines from [1]? Regards, Vedran [1] https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/preprocessorDirectives.html > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > b/src/gallium/state_trackers/clover/llvm/invocation.cpp > index 5490d72..b5e8b52 100644 > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > @@ -153,6 +153,9 @@ namespace { >// Add libclc include >c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); > > + // Add definition for the OpenCL version > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); > + >// clc.h requires that this macro be defined: > > c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers"); >c.getPreprocessorOpts().addRemappedFile( > -- Vedran Miletić vedran.miletic.net ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
On 08/29/2016 12:42 AM, Niels Ole Salscheider wrote: > This is required by the OpenCL standard. > > Signed-off-by: Niels Ole SalscheiderReviewed-by: Edward O'Callaghan > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > b/src/gallium/state_trackers/clover/llvm/invocation.cpp > index 5490d72..b5e8b52 100644 > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp > @@ -153,6 +153,9 @@ namespace { >// Add libclc include >c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); > > + // Add definition for the OpenCL version > + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); > + >// clc.h requires that this macro be defined: > > c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers"); >c.getPreprocessorOpts().addRemappedFile( > signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side
This is required by the OpenCL standard. Signed-off-by: Niels Ole Salscheider--- src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 5490d72..b5e8b52 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -153,6 +153,9 @@ namespace { // Add libclc include c.getPreprocessorOpts().Includes.push_back("clc/clc.h"); + // Add definition for the OpenCL version + c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110"); + // clc.h requires that this macro be defined: c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers"); c.getPreprocessorOpts().addRemappedFile( -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev