summaryrefslogtreecommitdiff
path: root/utests/compiler_fill_image_3d_2.cpp
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-06-13 17:44:00 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-06-13 17:49:36 +0800
commitbd72dbae9295285d8e325c48772c5a36a651906b (patch)
treec133dba800a64e7e706ed0119460c3cad2715fa7 /utests/compiler_fill_image_3d_2.cpp
parent9d112b8b04426d9b9ab9fda867d49550f47dca1a (diff)
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_fill_image_3d_2.cpp')
-rw-r--r--utests/compiler_fill_image_3d_2.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/utests/compiler_fill_image_3d_2.cpp b/utests/compiler_fill_image_3d_2.cpp
index f5ff7926..410ace86 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)
@@ -6,14 +7,24 @@ static void compiler_fill_image_3d_2(void)
const size_t h = 512;
const size_t depth = 5;
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;
+ desc.image_width = w;
+ desc.image_height = h;
+ desc.image_depth = depth;
+ desc.image_row_pitch = 0;
+ desc.image_slice_pitch = 0;
// Setup kernel and images
OCL_CREATE_KERNEL("test_fill_image_3d_2");
- OCL_CREATE_IMAGE3D(buf[0], 0, &format, w, h, depth, 0, 0, NULL);
+ OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL);
// Run the kernel
OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);