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

He Junyan junyan.he at inbox.com
Thu Jun 12 00:12:06 PDT 2014


Sorry, this patch is for opencl-1.2

On Thu, 2014-06-12 at 14:55 +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;





More information about the Beignet mailing list