Need one minor change as below.

> @@ -662,9 +673,12 @@ _cl_mem_new_image(cl_context ctx,
>      goto error;
>  
>    cl_buffer_set_tiling(mem->bo, tiling, aligned_pitch);
> -  aligned_slice_pitch = (image_type == CL_MEM_OBJECT_IMAGE1D || image_type 
> == CL_MEM_OBJECT_IMAGE2D
> -              || image_type == CL_MEM_OBJECT_IMAGE1D_ARRAY || image_type == 
> CL_MEM_OBJECT_IMAGE1D_BUFFER)
> -                  ? 0 : aligned_pitch * ALIGN(h, 2);
> +  if (image_type == CL_MEM_OBJECT_IMAGE1D ||
> +      image_type == CL_MEM_OBJECT_IMAGE2D ||
> +      image_type == CL_MEM_OBJECT_IMAGE1D_BUFFER)
> +    aligned_slice_pitch = 0;
> +  else
> +    aligned_slice_pitch = aligned_pitch * aligned_h;
-    aligned_slice_pitch = aligned_pitch * aligned_h;
+    aligned_slice_pitch = aligned_pitch * ALIGN(h, 2);
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to