[Beignet] [PATCH] Fix the 3D failed problem because the un-inited parameters

Zhigang Gong zhigang.gong at linux.intel.com
Thu Jun 12 02:06:43 PDT 2014


LGTM, will push latter. Thanks.

On Thu, Jun 12, 2014 at 02:55:30PM +0800, junyan.he at inbox.com wrote:
> From: Junyan He <junyan.he at linux.intel.com>
> 
> Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> ---
>  utests/compiler_fill_image_3d.cpp   | 4 ++++
>  utests/compiler_fill_image_3d_2.cpp | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/utests/compiler_fill_image_3d.cpp b/utests/compiler_fill_image_3d.cpp
> index ac0b7e0..ec96e80 100644
> --- a/utests/compiler_fill_image_3d.cpp
> +++ b/utests/compiler_fill_image_3d.cpp
> @@ -1,3 +1,4 @@
> +#include <string.h>
>  #include "utest_helper.hpp"
>  
>  static void compiler_fill_image_3d(void)
> @@ -9,6 +10,9 @@ static void compiler_fill_image_3d(void)
>    cl_image_format format;
>    cl_image_desc desc;
>  
> +  memset(&desc, 0x0, sizeof(cl_image_desc));
> +  memset(&format, 0x0, sizeof(cl_image_format));
> +
>    format.image_channel_order = CL_RGBA;
>    format.image_channel_data_type = CL_UNSIGNED_INT8;
>    desc.image_type = CL_MEM_OBJECT_IMAGE3D;
> diff --git a/utests/compiler_fill_image_3d_2.cpp b/utests/compiler_fill_image_3d_2.cpp
> index 4c56036..410ace8 100644
> --- a/utests/compiler_fill_image_3d_2.cpp
> +++ b/utests/compiler_fill_image_3d_2.cpp
> @@ -1,3 +1,4 @@
> +#include <string.h>
>  #include "utest_helper.hpp"
>  
>  static void compiler_fill_image_3d_2(void)
> @@ -8,6 +9,9 @@ static void compiler_fill_image_3d_2(void)
>    cl_image_format format;
>    cl_image_desc desc;
>  
> +  memset(&desc, 0x0, sizeof(cl_image_desc));
> +  memset(&format, 0x0, sizeof(cl_image_format));
> +
>    format.image_channel_order = CL_RGBA;
>    format.image_channel_data_type = CL_UNSIGNED_INT8;
>    desc.image_type = CL_MEM_OBJECT_IMAGE3D;
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list