[Bf-blender-cvs] [56d6666689f] master: GPU: Limit Mesa workaround to older version

Clément Foucault noreply at git.blender.org
Tue Feb 18 18:20:03 CET 2020


Commit: 56d6666689f7027126e8c115d01564810d1ae1bb
Author: Clément Foucault
Date:   Tue Feb 18 17:30:05 2020 +0100
Branches: master
https://developer.blender.org/rB56d6666689f7027126e8c115d01564810d1ae1bb

GPU: Limit Mesa workaround to older version

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

M	source/blender/gpu/intern/gpu_extensions.c

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

diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 33f918559f7..4676cc3b244 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -90,6 +90,7 @@ static struct GPUGlobal {
   /* Crappy driver don't know how to map framebuffer slot to output vars...
    * We need to have no "holes" in the output buffer slots. */
   bool unused_fb_slot_workaround;
+  bool broken_amd_driver;
   /* Some crappy Intel drivers don't work well with shaders created in different
    * rendering contexts. */
   bool context_local_shaders_workaround;
@@ -219,7 +220,7 @@ bool GPU_context_local_shaders_workaround(void)
 bool GPU_crappy_amd_driver(void)
 {
   /* Currently are the same drivers with the `unused_fb_slot` problem. */
-  return GPU_unused_fb_slot_workaround();
+  return GG.broken_amd_driver;
 }
 
 void gpu_extensions_init(void)
@@ -268,6 +269,7 @@ void gpu_extensions_init(void)
        * And many others... */
 
       GG.unused_fb_slot_workaround = true;
+      GG.broken_amd_driver = true;
     }
   }
 
@@ -328,7 +330,9 @@ void gpu_extensions_init(void)
       GG.context_local_shaders_workaround = true;
     }
   }
-  else if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
+  else if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) &&
+           (strstr(version, "Mesa 18.") || strstr(version, "Mesa 19.0") ||
+            strstr(version, "Mesa 19.1") || strstr(version, "Mesa 19.2"))) {
     /* See T70187: merging vertices fail. This has been tested from 18.2.2 till 19.3.0~dev of the
      * Mesa driver */
     GG.unused_fb_slot_workaround = true;



More information about the Bf-blender-cvs mailing list