[Piglit] [PATCH 1/2] get-kernel-work-group-info: Check value of CL_KERNEL_COMPILE_WORK_GROUP_SIZE
Tom Stellard
thomas.stellard at amd.com
Tue Mar 24 08:25:47 PDT 2015
Verify it returns {0,0,0} when the reqd_work_group_size attribute is
not specified.
---
tests/cl/api/get-kernel-work-group-info.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/cl/api/get-kernel-work-group-info.c b/tests/cl/api/get-kernel-work-group-info.c
index a38cdf0..2e12e0d 100644
--- a/tests/cl/api/get-kernel-work-group-info.c
+++ b/tests/cl/api/get-kernel-work-group-info.c
@@ -115,6 +115,31 @@ piglit_cl_test(const int argc,
piglit_merge_result(&result, PIGLIT_FAIL);
}
+ /* Checks for specific queries */
+ switch (kernel_work_group_infos[i]) {
+ case CL_KERNEL_COMPILE_WORK_GROUP_SIZE: {
+ size_t zero[3] = {0, 0, 0};
+ unsigned expected_size = 3 * sizeof(size_t);
+ if (param_value_size != expected_size) {
+ fprintf(stderr, "Error: "
+ "Invalid param_value_size "
+ "Expected %u, got %u\n",
+ expected_size,
+ (unsigned)param_value_size);
+ piglit_merge_result(&result, PIGLIT_FAIL);
+ }
+ if (memcmp(param_value, &zero, expected_size)) {
+ fprintf(stderr, "Error: expected {0,0,0} "
+ "when attribute "
+ "reqd_work_group_size is "
+ "unspecified.");
+ piglit_merge_result(&result, PIGLIT_FAIL);
+ }
+ break;
+ }
+ default: break;
+ }
+
//TODO: output returned values
printf("\n");
free(param_value);
--
2.0.4
More information about the Piglit
mailing list