summaryrefslogtreecommitdiff
path: root/utests/compiler_copy_image.cpp
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2014-05-16 15:13:34 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-05-22 13:44:16 +0800
commit6851a808e6811734f5719e77957f387b368ae1f8 (patch)
treedfba50335c4236090afdbd5be31f3f48f31ae8dc /utests/compiler_copy_image.cpp
parent7b18ac91d3cb964d925fb114d0452092f72795dc (diff)
downloadbeignet-6851a808e6811734f5719e77957f387b368ae1f8.tar.gz
Fix the bug of forgetting release sampler in utest.
utest helper will not help us to free the sampler resource as buffer and kernel. So we need to release it by ourself. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/compiler_copy_image.cpp')
-rw-r--r--utests/compiler_copy_image.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utests/compiler_copy_image.cpp b/utests/compiler_copy_image.cpp
index 58827f29..82fd02b0 100644
--- a/utests/compiler_copy_image.cpp
+++ b/utests/compiler_copy_image.cpp
@@ -41,6 +41,8 @@ static void compiler_copy_image(void)
OCL_ASSERT(((uint32_t*)buf_data[0])[j * w + i] == ((uint32_t*)buf_data[1])[j * w + i]);
OCL_UNMAP_BUFFER(0);
OCL_UNMAP_BUFFER(1);
+
+ OCL_CALL(clReleaseSampler, sampler);
}
MAKE_UTEST_FROM_FUNCTION(compiler_copy_image);