aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniranjanjoshi121 <43807392+niranjanjoshi121@users.noreply.github.com>2023-10-10 11:25:10 -0500
committerGitHub <noreply@github.com>2023-10-10 09:25:10 -0700
commitc73d6a341bdcc1c05fa995390672e56a4cf66c6c (patch)
treeb1cfffb7da9cf3e203b45945a12147905fa956f5
parentaf2710355db1ce873f8ea79b16e576abcbab6666 (diff)
downloadOpenCL-CTS-c73d6a341bdcc1c05fa995390672e56a4cf66c6c.tar.gz
Add NULL CL_MEM_HOST_PTR check for clGetMemObjectInfo (#1801)
The spec requires implementations return NULL for CL_MEM_HOST_PTR when the flags passed at memory object creation time do not contain CL_MEM_USE_HOST_PTR CTS was not checking this. Add the same check. Fixes #1752
-rw-r--r--test_conformance/api/test_mem_object_info.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test_conformance/api/test_mem_object_info.cpp b/test_conformance/api/test_mem_object_info.cpp
index 8dc8f6cf..7eedec85 100644
--- a/test_conformance/api/test_mem_object_info.cpp
+++ b/test_conformance/api/test_mem_object_info.cpp
@@ -217,6 +217,9 @@ int test_get_buffer_info( cl_device_id deviceID, cl_context context, cl_command_
// Create a buffer object to test against.
bufferObject = clCreateBuffer( context, bufferFlags[ i ], addressAlign * 4, NULL, &error );
test_error( error, "Unable to create buffer to test with" );
+ void *ptr;
+ TEST_MEM_OBJECT_PARAM(bufferObject, CL_MEM_HOST_PTR, ptr, NULL,
+ "host pointer", "%p", void *)
}
// Perform buffer object queries.