From e7e861a5a903087530cd32d304b19fb978f464a9 Mon Sep 17 00:00:00 2001 From: Grzegorz Wawiorko Date: Fri, 15 Mar 2019 10:51:31 +0100 Subject: [PATCH] Khronos Bug 15683 Missing OpenCL 2.1 support in API compatibility tests --- .../compatibility/test_conformance/api/test_api_min_max.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_conformance/compatibility/test_conformance/api/test_api_min_max.c b/test_conformance/compatibility/test_conformance/api/test_api_min_max.c index 61225e51..4dbdc9f6 100644 --- a/test_conformance/compatibility/test_conformance/api/test_api_min_max.c +++ b/test_conformance/compatibility/test_conformance/api/test_api_min_max.c @@ -552,7 +552,9 @@ int test_min_max_image_2d_width(cl_device_id deviceID, cl_context context, cl_co // Device version should fit the regex "OpenCL [0-9]+\.[0-9]+ *.*" error = clGetDeviceInfo( deviceID, CL_DEVICE_VERSION, sizeof( buffer ), buffer, &length ); test_error( error, "Unable to get device version string" ); - if( memcmp( buffer, "OpenCL 2.0", strlen( "OpenCL 2.0" ) ) == 0 ) + if( memcmp( buffer, "OpenCL 2.1", strlen( "OpenCL 2.1" ) ) == 0 ) + minRequiredDimension = gIsEmbedded ? 2048 : 8192; + else if( memcmp( buffer, "OpenCL 2.0", strlen( "OpenCL 2.0" ) ) == 0 ) minRequiredDimension = gIsEmbedded ? 2048 : 8192; else if( memcmp( buffer, "OpenCL 1.2", strlen( "OpenCL 1.2" ) ) == 0 ) minRequiredDimension = gIsEmbedded ? 2048 : 8192; @@ -628,7 +630,9 @@ int test_min_max_image_2d_height(cl_device_id deviceID, cl_context context, cl_c // Device version should fit the regex "OpenCL [0-9]+\.[0-9]+ *.*" error = clGetDeviceInfo( deviceID, CL_DEVICE_VERSION, sizeof( buffer ), buffer, &length ); test_error( error, "Unable to get device version string" ); - if( memcmp( buffer, "OpenCL 2.0", strlen( "OpenCL 2.0" ) ) == 0 ) + if( memcmp( buffer, "OpenCL 2.1", strlen( "OpenCL 2.1" ) ) == 0 ) + minRequiredDimension = gIsEmbedded ? 2048 : 8192; + else if( memcmp( buffer, "OpenCL 2.0", strlen( "OpenCL 2.0" ) ) == 0 ) minRequiredDimension = gIsEmbedded ? 2048 : 8192; else if( memcmp( buffer, "OpenCL 1.2", strlen( "OpenCL 1.2" ) ) == 0 ) minRequiredDimension = gIsEmbedded ? 2048 : 8192;