[Mesa-dev] [PATCH] st/clover: Define __OPENCL_VERSION__ on the device side

Francisco Jerez currojerez at riseup.net
Sat Sep 10 23:12:28 UTC 2016


Niels Ole Salscheider <niels_ole at salscheider-online.de> writes:

> 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 <niels_ole at salscheider-online.de>
>> > 
>> > Reviewed-by: Vedran Miletić <vedran at miletic.net>
>> > 
>> > 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160910/1c970e2f/attachment.sig>


More information about the mesa-dev mailing list