[Piglit] [PATCH] clGetDeviceInfo: Check for minimum value of CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE

Tom Stellard thomas.stellard at amd.com
Wed Jul 23 17:59:45 PDT 2014


---
 tests/cl/api/get-device-info.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/cl/api/get-device-info.c b/tests/cl/api/get-device-info.c
index 81ab11c..ca13fa1 100644
--- a/tests/cl/api/get-device-info.c
+++ b/tests/cl/api/get-device-info.c
@@ -59,6 +59,7 @@ piglit_cl_test(const int argc,
 
 	size_t param_value_size;
 	void* param_value;
+	int* int_value;
 
 	int num_device_infos = PIGLIT_CL_ENUM_NUM(cl_device_info, env->version);
 	const cl_device_info *device_infos = PIGLIT_CL_ENUM_ARRAY(cl_device_info);
@@ -149,5 +150,17 @@ piglit_cl_test(const int argc,
 	}
 
 
+	/*
+	 * Checks for minimum required values.
+	 */
+
+	int_value =  piglit_cl_get_device_info(env->device_id,
+				CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE);
+	if (*int_value < 64 * 1024) {
+		fprintf(stderr, "CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE must be "
+		                "at least 64 KB\n");
+		piglit_merge_result(&result, PIGLIT_FAIL);
+	}
+
 	return result;
 }
-- 
1.8.1.5



More information about the Piglit mailing list