[Beignet] [PATCH 1/2] cl/driver: fix the incorrect handling of 1D array.

Zhigang Gong zhigang.gong at linux.intel.com
Tue Jun 17 20:42:40 PDT 2014


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);


More information about the Beignet mailing list