diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-13 17:44:00 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-13 17:49:36 +0800 |
commit | bd72dbae9295285d8e325c48772c5a36a651906b (patch) | |
tree | c133dba800a64e7e706ed0119460c3cad2715fa7 /utests/compiler_get_image_info.cpp | |
parent | 9d112b8b04426d9b9ab9fda867d49550f47dca1a (diff) | |
download | beignet-bd72dbae9295285d8e325c48772c5a36a651906b.tar.gz |
utests: use OpenCL 1.2 API for image related test cases.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Diffstat (limited to 'utests/compiler_get_image_info.cpp')
-rw-r--r-- | utests/compiler_get_image_info.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/utests/compiler_get_image_info.cpp b/utests/compiler_get_image_info.cpp index 4454d031..3b9d132e 100644 --- a/utests/compiler_get_image_info.cpp +++ b/utests/compiler_get_image_info.cpp @@ -6,14 +6,24 @@ static void compiler_get_image_info(void) const size_t h = 512; const size_t depth = 3; cl_image_format format; + cl_image_desc desc; format.image_channel_order = CL_RGBA; format.image_channel_data_type = CL_UNSIGNED_INT8; + desc.image_type = CL_MEM_OBJECT_IMAGE3D; + desc.image_width = w; + desc.image_height = h; + desc.image_depth = depth; + desc.image_row_pitch = 0; + desc.image_slice_pitch = 0; + desc.num_mip_levels = 0; + desc.num_samples = 0; + desc.buffer = NULL; // Setup kernel and images OCL_CREATE_KERNEL("test_get_image_info"); - OCL_CREATE_IMAGE3D(buf[0], 0, &format, w, h, depth, 0, 0, NULL); + OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL); OCL_CREATE_BUFFER(buf[1], 0, 32 * sizeof(int), NULL); OCL_CREATE_BUFFER(buf[2], 0, 32 * sizeof(int), NULL); |