[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56777] trunk/blender/intern/cycles/device /device_cuda.cpp: Cycles CUDA: in case of cryptic error messages in the console, refer to wiki

Brecht Van Lommel brechtvanlommel at pandora.be
Mon May 13 23:36:48 CEST 2013


Revision: 56777
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56777
Author:   blendix
Date:     2013-05-13 21:36:48 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Cycles CUDA: in case of cryptic error messages in the console, refer to wiki
documentation for possible solutions.

Modified Paths:
--------------
    trunk/blender/intern/cycles/device/device_cuda.cpp

Modified: trunk/blender/intern/cycles/device/device_cuda.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device_cuda.cpp	2013-05-13 21:19:30 UTC (rev 56776)
+++ trunk/blender/intern/cycles/device/device_cuda.cpp	2013-05-13 21:36:48 UTC (rev 56777)
@@ -45,6 +45,7 @@
 	CUmodule cuModule;
 	map<device_ptr, bool> tex_interp_map;
 	int cuDevId;
+	bool first_error;
 
 	struct PixelMem {
 		GLuint cuPBO;
@@ -114,6 +115,14 @@
 #else
 #define cuda_abort() abort()
 #endif*/
+	void cuda_error_documentation()
+	{
+		if(first_error) {
+			fprintf(stderr, "\nRefer to the Cycles GPU rendering documentation for possible solutions:\n");
+			fprintf(stderr, "http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/GPU_Rendering\n\n");
+			first_error = false;
+		}
+	}
 
 #define cuda_assert(stmt) \
 	{ \
@@ -125,6 +134,7 @@
 				error_msg = message; \
 			fprintf(stderr, "%s\n", message.c_str()); \
 			/*cuda_abort();*/ \
+			cuda_error_documentation(); \
 		} \
 	}
 
@@ -137,6 +147,7 @@
 		if(error_msg == "")
 			error_msg = message;
 		fprintf(stderr, "%s\n", message.c_str());
+		cuda_error_documentation();
 		return true;
 	}
 
@@ -147,6 +158,7 @@
 		if(error_msg == "")
 			error_msg = message;
 		fprintf(stderr, "%s\n", message.c_str());
+		cuda_error_documentation();
 	}
 
 	void cuda_push_context()
@@ -161,6 +173,7 @@
 
 	CUDADevice(DeviceInfo& info, Stats &stats, bool background_) : Device(stats)
 	{
+		first_error = true;
 		background = background_;
 
 		cuDevId = info.num;




More information about the Bf-blender-cvs mailing list