diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-12-08 19:09:25 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-12-08 16:31:23 +0100 |
commit | 4a09777d8f043f79e4fdcb8d42ec60ea88ad14c0 (patch) | |
tree | c3f22090cccf03d4ac53ff90892ab4128a367d49 | |
parent | fdd07300524b278a9f674e5b13a8dabebed5e82f (diff) |
Windows 10 is the baseline, drop checks for older versions
Change-Id: I78c3b1e6efc73095cd11cecc4ffc30acba02f943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178089
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | opencl/source/openclwrapper.cxx | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 9588d7426680..e22a4e38fe23 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -32,8 +32,6 @@ #include <officecfg/Office/Common.hxx> #ifdef _WIN32 -#include <prewin.h> -#include <postwin.h> #define OPENCL_DLL_NAME "OpenCL.dll" #elif defined(MACOSX) #define OPENCL_DLL_NAME nullptr @@ -41,10 +39,6 @@ #define OPENCL_DLL_NAME "libOpenCL.so.1" #endif -#ifdef _WIN32_WINNT_WINBLUE -#include <VersionHelpers.h> -#endif - #define DEVICE_NAME_LENGTH 1024 #define DRIVER_VERSION_LENGTH 1024 #define PLATFORM_VERSION_LENGTH 1024 @@ -490,33 +484,10 @@ bool initOpenCLRunEnv( GPUEnv *gpuInfo ) clGetPlatformInfo(gpuInfo->mpPlatformID, CL_PLATFORM_NAME, 64, pName, nullptr); -#if defined (_WIN32) -// the Win32 SDK 8.1 deprecates GetVersionEx() -# ifdef _WIN32_WINNT_WINBLUE - const bool bIsNotWinOrIsWin8OrGreater = IsWindows8OrGreater(); -# else - bool bIsNotWinOrIsWin8OrGreater = true; - OSVERSIONINFOW aVersionInfo = {}; - aVersionInfo.dwOSVersionInfoSize = sizeof( aVersionInfo ); - if (GetVersionExW( &aVersionInfo )) - { - // Windows 7 or lower? - if (aVersionInfo.dwMajorVersion < 6 || - (aVersionInfo.dwMajorVersion == 6 && aVersionInfo.dwMinorVersion < 2)) - bIsNotWinOrIsWin8OrGreater = false; - } -# endif -#else - const bool bIsNotWinOrIsWin8OrGreater = true; -#endif - // Heuristic: Certain old low-end OpenCL implementations don't // work for us with too large group lengths. Looking at the preferred - // float vector width seems to be a way to detect these devices, except - // the non-working NVIDIA cards on Windows older than version 8. - gpuInfo->mbNeedsTDRAvoidance = ( nPreferredVectorWidthFloat == 4 ) || - ( !bIsNotWinOrIsWin8OrGreater && - OUString::createFromAscii(pName).indexOf("NVIDIA") > -1 ); + // float vector width seems to be a way to detect these devices. + gpuInfo->mbNeedsTDRAvoidance = nPreferredVectorWidthFloat == 4; size_t nMaxParameterSize; clGetDeviceInfo(gpuInfo->mpDevID, CL_DEVICE_MAX_PARAMETER_SIZE, sizeof(size_t), |