[Bf-blender-cvs] [7b3491f] master: OpenSubdiv: Fix for missing caching of vendor string parsing result

Sergey Sharybin noreply at git.blender.org
Wed Sep 16 17:24:26 CEST 2015


Commit: 7b3491f2c65b842eaa266f2e95822876fff93946
Author: Sergey Sharybin
Date:   Wed Sep 16 20:23:32 2015 +0500
Branches: master
https://developer.blender.org/rB7b3491f2c65b842eaa266f2e95822876fff93946

OpenSubdiv: Fix for missing caching of vendor string parsing result

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

M	intern/opensubdiv/opensubdiv_capi.cc
M	intern/opensubdiv/opensubdiv_utils_capi.cc

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

diff --git a/intern/opensubdiv/opensubdiv_capi.cc b/intern/opensubdiv/opensubdiv_capi.cc
index a56e29f..11cf170 100644
--- a/intern/opensubdiv/opensubdiv_capi.cc
+++ b/intern/opensubdiv/opensubdiv_capi.cc
@@ -304,6 +304,7 @@ int openSubdiv_supportGPUDisplay(void)
 		static bool vendor_checked = false;
 		static bool is_intel = false;
 		if (!vendor_checked) {
+			vendor_checked = true;
 			const char *vendor = (const char *)glGetString(GL_VENDOR);
 			if (strstr(vendor, "Intel")) {
 				if(getenv("OPENSUBDIV_ALLOW_INTEL") == NULL) {
diff --git a/intern/opensubdiv/opensubdiv_utils_capi.cc b/intern/opensubdiv/opensubdiv_utils_capi.cc
index a3aff53..74db862 100644
--- a/intern/opensubdiv/opensubdiv_utils_capi.cc
+++ b/intern/opensubdiv/opensubdiv_utils_capi.cc
@@ -78,6 +78,7 @@ int openSubdiv_getAvailableEvaluators(void)
 	 * hard time evaluating required shaders.
 	 */
 	if (!vendor_checked) {
+		vendor_checked = true;
 		const char *vendor = (const char *)glGetString(GL_VENDOR);
 		const char *renderer = (const char *)glGetString(GL_RENDERER);
 		if (strstr(vendor, "ATI") ||




More information about the Bf-blender-cvs mailing list