Pushed.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Guo, Yejun > Sent: Thursday, October 29, 2015 15:05 > To: Luo, Xionghu; [email protected] > Cc: Luo, Xionghu > Subject: Re: [Beignet] [patch V2] set the pitch of image from buffer to the > buffer's pitch. > > Looks fine to me, thanks. > > -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > [email protected] > Sent: Thursday, October 29, 2015 3:02 PM > To: [email protected] > Cc: Luo, Xionghu > Subject: [Beignet] [patch V2] set the pitch of image from buffer to the > buffer's pitch. > > From: Luo Xionghu <[email protected]> > > if image from buffer, the image's pitch should be same with buffer bo's row > pitch. > > v2: correct style. image from buffer need update both aligned_pitch and > aligned_h, while image from user ptr only set aligned_pitch, so just keep > them independently. > > Signed-off-by: Luo Xionghu <[email protected]> > --- > src/cl_mem.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/cl_mem.c b/src/cl_mem.c index cb2af47..72c335d 100644 > --- a/src/cl_mem.c > +++ b/src/cl_mem.c > @@ -851,8 +851,13 @@ _cl_mem_new_image(cl_context ctx, > if (aligned_pitch < pitch && enableUserptr) > aligned_pitch = pitch; > //no need align the height if 2d image from buffer. > - if (image_type == CL_MEM_OBJECT_IMAGE2D && buffer != NULL) > + //the pitch should be same with buffer's pitch as they share same bo. > + if (image_type == CL_MEM_OBJECT_IMAGE2D && buffer != NULL) { > + if(aligned_pitch < pitch) { > + aligned_pitch = pitch; > + } > aligned_h = h; > + } > else > aligned_h = ALIGN(h, cl_buffer_get_tiling_align(ctx, CL_NO_TILE, 1)); > } else if (tiling == CL_TILE_X) { > -- > 1.9.1 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
