LGTM, thanks.
> -----Original Message----- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Thursday, August 13, 2015 10:24 > To: beignet@lists.freedesktop.org > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH 1/4] GBE: fix the broken image_1d_buffer write. > > We should treat it as a 2D image as image 1d buffer may be exceed the 1D > image size restrication. > > Signed-off-by: Zhigang Gong <zhigang.g...@intel.com> > --- > backend/src/libocl/src/ocl_image.cl | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/backend/src/libocl/src/ocl_image.cl > b/backend/src/libocl/src/ocl_image.cl > index a8dbc92..eb1a2ff 100644 > --- a/backend/src/libocl/src/ocl_image.cl > +++ b/backend/src/libocl/src/ocl_image.cl > @@ -387,10 +387,22 @@ DECL_IMAGE_TYPE(image2d_array_t, 3) > cl_image, defaultSampler, convert_float2(effectCoord), 0); > \ > } > > +#define DECL_WRITE_IMAGE1D_BUFFER(image_type, image_data_type, > suffix, coord_type) \ > + OVERLOADABLE void write_image ##suffix(image_type cl_image, > \ > + coord_type coord, > \ > + image_data_type color) > \ > + { > \ > + int2 effectCoord; > \ > + effectCoord.s0 = coord %8192; > \ > + effectCoord.s1 = coord / 8192; > \ > + __gen_ocl_write_image ##suffix(cl_image, effectCoord, color); > \ > + } > + > + > #define DECL_IMAGE_1DBuffer(int_clamping_fix, image_data_type, suffix) > \ > DECL_READ_IMAGE1D_BUFFER_NOSAMPLER(image1d_buffer_t, > image_data_type, \ > suffix, int) > \ > - DECL_WRITE_IMAGE(image1d_buffer_t, image_data_type, suffix, int) > + DECL_WRITE_IMAGE1D_BUFFER(image1d_buffer_t, image_data_type, > suffix, > + int) > > DECL_IMAGE_1DBuffer(GEN_FIX_INT_CLAMPING, int4, i) > DECL_IMAGE_1DBuffer(GEN_FIX_INT_CLAMPING, uint4, ui) > -- > 1.9.1 > > _______________________________________________ > Beignet mailing list > Beignet@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet