[Bf-blender-cvs] [21195a9] master: check compute shader support for OpenSubdiv

Mike Erwin noreply at git.blender.org
Mon Nov 16 05:15:14 CET 2015


Commit: 21195a9ea4b0c570224a517d78db2fcd36fa3d41
Author: Mike Erwin
Date:   Sun Nov 15 14:49:59 2015 -0500
Branches: master
https://developer.blender.org/rB21195a9ea4b0c570224a517d78db2fcd36fa3d41

check compute shader support for OpenSubdiv

Built into OpenGL 4.3, or 4.2 plus ARB_compute_shader extension.

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

M	intern/opensubdiv/opensubdiv_utils_capi.cc

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

diff --git a/intern/opensubdiv/opensubdiv_utils_capi.cc b/intern/opensubdiv/opensubdiv_utils_capi.cc
index 6556b8c..aac1995 100644
--- a/intern/opensubdiv/opensubdiv_utils_capi.cc
+++ b/intern/opensubdiv/opensubdiv_utils_capi.cc
@@ -73,8 +73,9 @@ int openSubdiv_getAvailableEvaluators(void)
 #endif  /* OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK */
 
 #ifdef OPENSUBDIV_HAS_GLSL_COMPUTE
-	/* TODO(sergey): Do we need to check availble extensions here? */
-	flags |= OPENSUBDIV_EVALUATOR_GLSL_COMPUTE;
+	if (GLEW_VERSION_4_3 || GLEW_ARB_compute_shader) {
+		flags |= OPENSUBDIV_EVALUATOR_GLSL_COMPUTE;
+	}
 #endif  /* OPENSUBDIV_HAS_GLSL_COMPUTE */
 
 	return flags;




More information about the Bf-blender-cvs mailing list