On Mon, 2017-02-27 at 20:44 -0500, Jan Vesely wrote: > On Wed, 2017-02-22 at 11:27 -0500, Jan Vesely wrote: > > Signed-off-by: Jan Vesely <[email protected]> > > --- > > tests/cl/api/set-kernel-arg.c | 21 ++++++++++++--------- > > 1 file changed, 12 insertions(+), 9 deletions(-) > > > > diff --git a/tests/cl/api/set-kernel-arg.c b/tests/cl/api/set-kernel-arg.c > > index d306931..8679ccb 100644 > > --- a/tests/cl/api/set-kernel-arg.c > > +++ b/tests/cl/api/set-kernel-arg.c > > @@ -219,16 +219,19 @@ piglit_cl_test(const int argc, > > /* > > * CL_INVALID_MEM_OBJECT for an argument declared to be a memory object > > when > > * the specified arg_value is not a valid memory object. > > + * OpenCL 1.1+ allows pointer to NULL to act as NULL argument. > > */ > > - test_str = "Trigger CL_INVALID_MEM_OBJECT for an argument declared to > > be a memory object when the specified arg_value is not a valid memory > > object."; > > - errNo = clSetKernelArg(kernel, 0, sizeof(cl_mem), &invalid_buffer); > > - if( errNo != CL_INVALID_MEM_OBJECT > > - && errNo != CL_INVALID_ARG_VALUE) { // two possible values > > - piglit_cl_check_error(errNo, CL_INVALID_MEM_OBJECT); > > - fprintf(stderr, > > - "Failed (error code: %s): %s\n", > > - piglit_cl_get_error_name(errNo), test_str); > > - piglit_merge_result(&input_check_result, PIGLIT_FAIL); > > + if (env->version == 100) { > > + test_str = "Trigger CL_INVALID_MEM_OBJECT for an argument > > declared to be a memory object when the specified arg_value is not a valid > > memory object."; > > + errNo = clSetKernelArg(kernel, 0, sizeof(cl_mem), > > &invalid_buffer); > > + if( errNo != CL_INVALID_MEM_OBJECT > > + && errNo != CL_INVALID_ARG_VALUE) { // two possible values > > + piglit_cl_check_error(errNo, CL_INVALID_MEM_OBJECT); > > + fprintf(stderr, > > + "Failed (error code: %s): %s\n", > > + piglit_cl_get_error_name(errNo), test_str); > > + piglit_merge_result(&input_check_result, PIGLIT_FAIL); > > + } > > } > > > > /* > > ping ping -- Jan Vesely <[email protected]>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
