[Bf-blender-cvs] [ceaed47bf9a] master: GPU: Enable HQ normal work around on Linux.

Jeroen Bakker noreply at git.blender.org
Fri Jan 8 10:24:42 CET 2021


Commit: ceaed47bf9a31acdce8cd8bdd436c55c74605b27
Author: Jeroen Bakker
Date:   Fri Jan 8 10:23:20 2021 +0100
Branches: master
https://developer.blender.org/rBceaed47bf9a31acdce8cd8bdd436c55c74605b27

GPU: Enable HQ normal work around on Linux.

Linux does not report the driver version. It does report the OpenGL
version. This change will check the OpenGL version to enable the HQ
normal work around.

===================================================================

M	source/blender/gpu/opengl/gl_backend.cc

===================================================================

diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc
index d9bc3a78dd8..140425b349a 100644
--- a/source/blender/gpu/opengl/gl_backend.cc
+++ b/source/blender/gpu/opengl/gl_backend.cc
@@ -275,8 +275,8 @@ static void detect_workarounds()
    * `GL_INT_2_10_10_10_REV` data type. This data type is used to pack normals. The work around
    * uses `GPU_RGBA16I`.*/
   if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {
-    if (strstr(version, " 20.11.2") || strstr(version, " 20.11.3 ") ||
-        strstr(version, " 20.12.")) {
+    /* On Linux the driver does not report its version. Test the OpenGL version in stead. */
+    if (strstr(version, "4.5.14756") || strstr(version, "4.5.14757")) {
       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 ") ||



More information about the Bf-blender-cvs mailing list