[Beignet] [PATCH] Fix the 3D failed problem because the un-inited parameters
junyan.he at inbox.com
junyan.he at inbox.com
Wed Jun 11 23:55:30 PDT 2014
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
More information about the Beignet
mailing list