[Piglit] [PATCH 1/1] cl: Don't warn when using deprecated functions.

Jan Vesely jan.vesely at rutgers.edu
Fri Jan 15 14:38:43 PST 2016


Deprecated features are required to be supported until they are removed.

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 tests/cl/api/get-image-info.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/tests/cl/api/get-image-info.c b/tests/cl/api/get-image-info.c
index b315ae9..2d653b1 100644
--- a/tests/cl/api/get-image-info.c
+++ b/tests/cl/api/get-image-info.c
@@ -88,23 +88,17 @@ piglit_cl_test(const int argc,
 		                      &image_desc,
 		                      NULL,
 		                      &errNo);
-	} else {
-		fprintf(stderr, "Could not create image. Piglit was compiled against OpenCL version >= 1.2 and cannot run this test for versions < 1.2 because clCreateImage function is not present.\n");
-		return PIGLIT_WARN;
-	}
-#else //CL_VERSION_1_2
-	if(env->version <= 11) {
+	} else
+#endif //CL_VERSION_1_2
+	{
 		image = clCreateImage2D(env->context->cl_ctx,
 		                        CL_MEM_READ_WRITE,
 		                        &image_format,
 		                        128, 128, 0,
 		                        NULL,
 		                        &errNo);
-	} else {
-		fprintf(stderr, "Could not create image. Piglit was compiled against OpenCL version < 1.2 and cannot run this test for versions >= 1.2 because clCreateImage2D function was deprecated.\n");
-		return PIGLIT_WARN;
 	}
-#endif //CL_VERSION_1_2
+
 	if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
 		fprintf(stderr,
 		        "Failed (error code: %s): Create an image.\n",
-- 
2.5.0



More information about the Piglit mailing list