[Bf-blender-cvs] [1dc31f5b982] blender2.8: GPU: Fix missing case of new radeon on xorg.

Clément Foucault noreply at git.blender.org
Mon Jun 4 15:15:06 CEST 2018


Commit: 1dc31f5b982559bbe875d469950ee7404e9a4a3c
Author: Clément Foucault
Date:   Mon Jun 4 15:14:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1dc31f5b982559bbe875d469950ee7404e9a4a3c

GPU: Fix missing case of new radeon on xorg.

This was causing issue with shader compilation.

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

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 73e86c1b391..226711e230f 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -174,7 +174,7 @@ void gpu_extensions_init(void)
 	const char *renderer = (const char *)glGetString(GL_RENDERER);
 	const char *version = (const char *)glGetString(GL_VERSION);
 
-	if (strstr(vendor, "ATI")) {
+	if (strstr(vendor, "ATI") || strstr(vendor, "AMD")) {
 		GG.device = GPU_DEVICE_ATI;
 		GG.driver = GPU_DRIVER_OFFICIAL;
 	}
@@ -191,6 +191,7 @@ void gpu_extensions_init(void)
 		GG.driver = GPU_DRIVER_OFFICIAL;
 	}
 	else if ((strstr(renderer, "Mesa DRI R")) ||
+	         (strstr(renderer, "Radeon") && strstr(vendor, "X.Org")) ||
 	         (strstr(renderer, "Gallium ") && strstr(renderer, " on ATI ")) ||
 	         (strstr(renderer, "Gallium ") && strstr(renderer, " on AMD ")))
 	{
@@ -214,6 +215,7 @@ void gpu_extensions_init(void)
 		GG.driver = GPU_DRIVER_SOFTWARE;
 	}
 	else {
+		printf("Warning: Could not find a matching GPU name. Things may not behave as expected.\n");
 		GG.device = GPU_DEVICE_ANY;
 		GG.driver = GPU_DRIVER_ANY;
 	}



More information about the Bf-blender-cvs mailing list