On Sun, Dec 14, 2014 at 5:02 PM, Zhigang Gong <zhigang.g...@intel.com> wrote: > diff --git a/backend/src/libocl/include/ocl_types.h > b/backend/src/libocl/include/ocl_types.h > index 49ac907..7798ee1 100644 > --- a/backend/src/libocl/include/ocl_types.h > +++ b/backend/src/libocl/include/ocl_types.h > @@ -87,8 +87,8 @@ DEF(double); > // FIXME: > // This is a transitional hack to bypass the LLVM 3.3 built-in types. > // See the Khronos SPIR specification for handling of these types. > -#define sampler_t __sampler_t > -typedef const ushort __sampler_t; > +//#define sampler_t __sampler_t > +//typedef const ushort __sampler_t;
Did you mean to delete these lines, instead of commenting them out? > > ///////////////////////////////////////////////////////////////////////////// > // OpenCL built-in event types > diff --git a/backend/src/libocl/src/ocl_image.cl > b/backend/src/libocl/src/ocl_image.cl > index c4ca2f8..6da8e90 100644 > --- a/backend/src/libocl/src/ocl_image.cl > +++ b/backend/src/libocl/src/ocl_image.cl > @@ -136,18 +136,24 @@ GEN_VALIDATE_ARRAY_INDEX(int, image1d_buffer_t) > // integer type surfaces correctly with CLK_ADDRESS_CLAMP and > CLK_FILTER_NEAREST. > // The work around is to use a LD message instead of normal sample message. > > /////////////////////////////////////////////////////////////////////////////// > + > +bool __gen_ocl_sampler_need_fix(sampler_t); > +bool __gen_ocl_sampler_need_rounding_fix(sampler_t); > + > bool __gen_sampler_need_fix(const sampler_t sampler) > { > - return (((sampler & __CLK_ADDRESS_MASK) == CLK_ADDRESS_CLAMP) && > - ((sampler & __CLK_FILTER_MASK) == CLK_FILTER_NEAREST)); > + return __gen_ocl_sampler_need_fix(sampler); > + > +// return (((sampler & __CLK_ADDRESS_MASK) == CLK_ADDRESS_CLAMP) && > +// ((sampler & __CLK_FILTER_MASK) == CLK_FILTER_NEAREST)); And here? > } > > bool __gen_sampler_need_rounding_fix(const sampler_t sampler) > { > - return ((sampler & CLK_NORMALIZED_COORDS_TRUE) == 0); > + return __gen_ocl_sampler_need_rounding_fix(sampler); > +// return ((sampler & CLK_NORMALIZED_COORDS_TRUE) == 0); And here? Copyright date should be updated as well. _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet