diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-05-16 10:58:51 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-05-17 15:19:00 +0800 |
commit | fce9f3eb89eeee3fba2296cad936fac582b1dc9f (patch) | |
tree | f133b093015da084cb173bfc9d7adafe7417e4cd /utests/utest_helper.hpp | |
parent | 2d33298c289fc7194b2770c751b50e079178ee0e (diff) | |
download | beignet-fce9f3eb89eeee3fba2296cad936fac582b1dc9f.tar.gz |
utests: Refine the fill image0 test case to use map gtt.
Now we don't fill the whole image to a const color. we
fill it according to the coords. Then we can use map gtt
to get the result and verify the result easily on cpu
side.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Simon Richter <Simon.Richter@hogyros.de>
Diffstat (limited to 'utests/utest_helper.hpp')
-rw-r--r-- | utests/utest_helper.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utests/utest_helper.hpp b/utests/utest_helper.hpp index 52584167..d882fc7b 100644 --- a/utests/utest_helper.hpp +++ b/utests/utest_helper.hpp @@ -111,6 +111,17 @@ extern EGLSurface eglSurface; } \ } while (0) +#define OCL_MAP_BUFFER_GTT(ID) \ + OCL_CALL2(clMapBufferGTTIntel, buf_data[ID], buf[ID]) + +#define OCL_UNMAP_BUFFER_GTT(ID) \ + do { \ + if (buf[ID] != NULL) { \ + OCL_CALL (clUnmapBufferGTTIntel, buf[ID]); \ + buf_data[ID] = NULL; \ + } \ + } while (0) + #define OCL_NDRANGE(DIM_N) \ OCL_CALL (clEnqueueNDRangeKernel, queue, kernel, DIM_N, NULL, globals, locals, 0, NULL, NULL) |