Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/opensubdiv/opensubdiv_capi.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_capi.cc b/intern/opensubdiv/opensubdiv_capi.cc
index 28d1c259246..dbd93a0a5e9 100644
--- a/intern/opensubdiv/opensubdiv_capi.cc
+++ b/intern/opensubdiv/opensubdiv_capi.cc
@@ -30,6 +30,7 @@
# include "iso646.h"
#endif
+#include <stdlib.h>
#include <GL/glew.h>
#include <opensubdiv/osd/glMesh.h>
@@ -294,6 +295,28 @@ const struct OpenSubdiv_TopologyRefinerDescr *openSubdiv_getGLMeshTopologyRefine
int openSubdiv_supportGPUDisplay(void)
{
+ {
+ /* Currently Intel GPUs has hard time working on Windows.
+ *
+ * For until we've got access to a hardware which demonstrates
+ * the issue we disable OpenSubdiv on Intel GPUs.
+ */
+ static bool vendor_checked = false;
+ static bool is_intel = false;
+ if (!vendor_checked) {
+ const char *vendor = (const char *)glGetString(GL_VENDOR);
+ const char *renderer = (const char *)glGetString(GL_RENDERER);
+ if (strstr(vendor, "Intel")) {
+ if(getenv("OPENSUBDIV_ALLOW_INTEL") == NULL) {
+ is_intel = true;
+ }
+ }
+ }
+ if (is_intel) {
+ return false;
+ }
+ }
+
return GLEW_EXT_geometry_shader4 &&
GLEW_ARB_gpu_shader5 &&
GLEW_ARB_uniform_buffer_object;