[Beignet] BUG: Incorrect image write when global work size is an odd multiple of 16

Zhigang Gong zhigang.gong at linux.intel.com
Sun May 19 23:53:42 PDT 2013


It turns out to be wrong usage of buf mapping on an image in the unit
test case. There should be no bugs in the gbe or runtime library side.
We need to use clEnqueueMapImage rather than the clEnqueueMapBuffer here.

As you already worked on clEnqueueMapImage, I will fix this bug after
your patchset get merged. Thanks.

On Mon, May 20, 2013 at 02:03:56PM +0800, Zhigang Gong wrote:
> Reproduced on my machine, investigating. Thanks for report this bug.
> 
> On Sun, May 19, 2013 at 11:30:11AM +0200, Dag Lem wrote:
> > Hi,
> > 
> > If the global work size is an odd multiple of 16, image writes are
> > garbled in the last work group(s).
> > 
> > The diff below triggers the bug in the compiler_fill_image test.
> > 
> > diff --git a/utests/compiler_fill_image.cpp
> > b/utests/compiler_fill_image.cpp
> > index c9242b2..6d29342 100644
> > --- a/utests/compiler_fill_image.cpp
> > +++ b/utests/compiler_fill_image.cpp
> > @@ -2,8 +2,8 @@
> >  
> >  static void compiler_fill_image(void)
> >  {
> > -  const size_t w = 512;
> > -  const size_t h = 512;
> > +  const size_t w = 1*16;
> > +  const size_t h = 1*16;
> >    uint32_t color = 0x12345678;
> >    cl_image_format format;
> >    cl_image_desc desc;
> > -- 
> > Best regards,
> > 
> > Dag Lem
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list