[Beignet] [PATCH] Fix NO_TILING alignment bug.

Zhigang Gong zhigang.gong at linux.intel.com
Tue Nov 18 20:56:26 PST 2014


LGTM, pushed, thanks.

On Tue, Nov 18, 2014 at 03:00:17PM +0800, Yang Rong wrote:
> Also need align height when CL_NO_TILING. This patch can fix some tiling_y error.
> 
> Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> ---
>  src/cl_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/cl_mem.c b/src/cl_mem.c
> index 0fbd304..967c3ac 100644
> --- a/src/cl_mem.c
> +++ b/src/cl_mem.c
> @@ -785,7 +785,7 @@ _cl_mem_new_image(cl_context ctx,
>    if(tiling != CL_NO_TILE && sz > MAX_TILING_SIZE) {
>      tiling = CL_NO_TILE;
>      aligned_pitch = w * bpp;
> -    aligned_h     = h;
> +    aligned_h     = ALIGN(h, cl_buffer_get_tiling_align(ctx, CL_NO_TILE, 1));
>      sz = aligned_pitch * aligned_h * depth;
>    }
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list