diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-10-07 19:42:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-10-09 14:41:26 +0300 |
commit | 7790298f61915152f7644561473532340b383745 (patch) | |
tree | 41d1f94163c9f4617119b57add6b4627d082f583 /source/blender/gpu/intern | |
parent | cf682b9dab36c4b96084c6f7b5e4ebc1f33ca28e (diff) |
GPU: show one-time startup warnings for old Intel drivers with known issues
This is pretty conservative. We do not show warnings for e.g. HD 4000 with the
latest drivers as they appear to be working mostly fine even if unsupported,
and there is nothing the user can do to improve things.
Ref T70520
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_platform.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/source/blender/gpu/intern/gpu_platform.c b/source/blender/gpu/intern/gpu_platform.c index 5d668a5c674..b161052acc3 100644 --- a/source/blender/gpu/intern/gpu_platform.c +++ b/source/blender/gpu/intern/gpu_platform.c @@ -54,22 +54,6 @@ typedef struct GPUPlatformSupportTest { const char *version; } GPUPlatformSupportTest; -// clang-format off -static GPUPlatformSupportTest GPU_PLATFORM_SUPPORT_TESTS[] = { - /* This terminator record must be the last item */ - {-1, GPU_DEVICE_ANY, GPU_OS_ANY, GPU_DRIVER_ANY, "", "", ""}}; -// clang-format on - -static bool gpu_platform_support_match(const GPUPlatformSupportTest *test_record, - const char *vendor, - const char *renderer, - const char *version) -{ - return GPU_type_matches(test_record->device, test_record->os, test_record->driver) && - (strstr(vendor, test_record->vendor) && strstr(renderer, test_record->renderer) && - strstr(version, test_record->version)); -} - eGPUSupportLevel GPU_platform_support_level(void) { return GPG.support_level; @@ -220,11 +204,16 @@ void gpu_platform_init(void) GPG.support_level = GPU_SUPPORT_LEVEL_UNSUPPORTED; } else { - for (int index = 0; GPU_PLATFORM_SUPPORT_TESTS[index].support_level != -1; index++) { - GPUPlatformSupportTest *test = &GPU_PLATFORM_SUPPORT_TESTS[index]; - if (gpu_platform_support_match(test, vendor, renderer, version)) { - GPG.support_level = test->support_level; - break; + if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY)) { + /* Old Intel drivers with known bugs that cause material properties to crash. + * Version Build 10.18.14.5067 is the latest available and appears to be working + * ok with our workarounds, so excluded from this list. */ + if (strstr(version, "Build 7.14") || strstr(version, "Build 7.15") || + strstr(version, "Build 8.15") || strstr(version, "Build 9.17") || + strstr(version, "Build 9.18") || strstr(version, "Build 10.18.10.3") || + strstr(version, "Build 10.18.10.4") || strstr(version, "Build 10.18.10.5") || + strstr(version, "Build 10.18.14.4")) { + GPG.support_level = GPU_SUPPORT_LEVEL_LIMITED; } } } |