diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 84bd9abf156..1d76b07c966 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -34,28 +34,6 @@ namespace blender::gpu { -/* See T82856: AMD drivers since 20.11 running on a polaris architecture doesn't support the - * `GL_INT_2_10_10_10_REV` data type correctly. This data type is used to pack normals and flags. - * The work around uses `GPU_RGBA16I` but that is only possible for loop normals. - * - * Vertex and Face normals would still render resulting in undefined behavior during selection and - * rendering. */ -static bool is_faulty_T82856_platform(const char *version, const char *renderer) -{ - /* On Linux the driver does not report its version. Test the OpenGL version in stead. */ - if (strstr(version, "4.5.1475")) { - if (strstr(renderer, " RX 460 ") || strstr(renderer, " RX 470 ") || - strstr(renderer, " RX 480 ") || strstr(renderer, " RX 490 ") || - strstr(renderer, " RX 560 ") || strstr(renderer, " RX 560X ") || - strstr(renderer, " RX 570 ") || strstr(renderer, " RX 580 ") || - strstr(renderer, " RX 590 ") || strstr(renderer, " RX550/550 ") || - strstr(renderer, " (TM) 520 ") || strstr(renderer, " (TM) 530 ") || - strstr(renderer, " R5 ") || strstr(renderer, " R7 ") || strstr(renderer, " R9 ")) { - return true; - } - } - return false; -} /* -------------------------------------------------------------------- */ /** \name Platform * \{ */ @@ -294,9 +272,17 @@ static void detect_workarounds() GCaps.broken_amd_driver = true; } /* See T82856: AMD drivers since 20.11 running on a polaris architecture doesn't support the - * `GL_INT_2_10_10_10_REV` data type. */ + * `GL_INT_2_10_10_10_REV` data type correctly. This data type is used to pack normals and flags. + * The work around uses `GPU_RGBA16I`. + */ if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) { - if (is_faulty_T82856_platform(version, renderer)) { + if (strstr(renderer, " RX 460 ") || strstr(renderer, " RX 470 ") || + strstr(renderer, " RX 480 ") || strstr(renderer, " RX 490 ") || + strstr(renderer, " RX 560 ") || strstr(renderer, " RX 560X ") || + strstr(renderer, " RX 570 ") || strstr(renderer, " RX 580 ") || + strstr(renderer, " RX 590 ") || strstr(renderer, " RX550/550 ") || + strstr(renderer, " (TM) 520 ") || strstr(renderer, " (TM) 530 ") || + strstr(renderer, " R5 ") || strstr(renderer, " R7 ") || strstr(renderer, " R9 ")) { GCaps.use_hq_normals_workaround = true; } } |