[Piglit] [PATCH 1/2] get-kernel-work-group-info: Check value of CL_KERNEL_COMPILE_WORK_GROUP_SIZE
Jan Vesely
jan.vesely at rutgers.edu
Tue Mar 24 12:19:31 PDT 2015
On Tue, 2015-03-24 at 15:25 +0000, Tom Stellard wrote:
> 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);
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150324/b43a005c/attachment.sig>
More information about the Piglit
mailing list