summaryrefslogtreecommitdiff
path: root/utests/get_cl_info.cpp
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2014-06-13 15:08:10 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-06-13 16:58:40 +0800
commit6caeef0ebb89cd97a88baf7c06ab28c1df37e0fa (patch)
tree107fd352cb76714097d3195e494b99dd7aad4481 /utests/get_cl_info.cpp
parent13f708910a49e833fcb3612fe13cbad9174a3316 (diff)
downloadbeignet-6caeef0ebb89cd97a88baf7c06ab28c1df37e0fa.tar.gz
utests: fix the image desc initilization for get_image_info.
As now the clCreateImage implements more check, we need to set more elements to pass all the argument check. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Diffstat (limited to 'utests/get_cl_info.cpp')
-rw-r--r--utests/get_cl_info.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/utests/get_cl_info.cpp b/utests/get_cl_info.cpp
index 4148ce96..0e87e286 100644
--- a/utests/get_cl_info.cpp
+++ b/utests/get_cl_info.cpp
@@ -502,9 +502,21 @@ void get_image_info(void)
const size_t w = 512;
const size_t h = 512;
cl_image_format format;
+ cl_image_desc desc;
+
format.image_channel_order = CL_RGBA;
format.image_channel_data_type = CL_UNSIGNED_INT8;
- OCL_CREATE_IMAGE2D(buf[0], 0, &format, w, h, 0, NULL);
+ desc.image_type = CL_MEM_OBJECT_IMAGE2D;
+ desc.image_width = w;
+ desc.image_height = h;
+ desc.image_row_pitch = 0;
+ desc.image_row_pitch = 0;
+ desc.image_slice_pitch = 0;
+ desc.num_mip_levels = 0;
+ desc.num_samples = 0;
+ desc.buffer = NULL;
+
+ OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL);
cl_mem image = buf[0];
cl_image_format ret_format;