From ddbafd1ccaad67265b934d1044dddb457ebd4273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 21 Jun 2024 09:18:08 +0800 Subject: [PATCH] OpenCL: use the newest supported OpenCL version --- src/detection/opencl/opencl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/opencl/opencl.c b/src/detection/opencl/opencl.c index ed71afca0..0626dd4d3 100644 --- a/src/detection/opencl/opencl.c +++ b/src/detection/opencl/opencl.c @@ -43,7 +43,8 @@ static const char* openCLHandleData(OpenCLData* data, FFOpenCLResult* result) if (data->ffclGetPlatformInfo(platforms[iplat], CL_PLATFORM_VERSION, sizeof(buffer), buffer, NULL) != CL_SUCCESS) return "clGetPlatformInfo() failed"; - if (iplat == 0) + // Use the newest supported OpenCL version + if (ffStrbufCompS(&result->version, buffer) < 0) { const char* versionPretty = buffer; if(ffStrStartsWithIgnCase(buffer, "OpenCL "))