From cd3283f573164bd30a2dd926bb6475da311eb188 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 13 May 2013 21:36:48 +0000 Subject: [PATCH] Cycles CUDA: in case of cryptic error messages in the console, refer to wiki documentation for possible solutions. --- intern/cycles/device/device_cuda.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index e3291cc6d88..ec7440c972c 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -45,6 +45,7 @@ public: CUmodule cuModule; map tex_interp_map; int cuDevId; + bool first_error; struct PixelMem { GLuint cuPBO; @@ -114,6 +115,14 @@ public: #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 @@ public: error_msg = message; \ fprintf(stderr, "%s\n", message.c_str()); \ /*cuda_abort();*/ \ + cuda_error_documentation(); \ } \ } @@ -137,6 +147,7 @@ public: if(error_msg == "") error_msg = message; fprintf(stderr, "%s\n", message.c_str()); + cuda_error_documentation(); return true; } @@ -147,6 +158,7 @@ public: if(error_msg == "") error_msg = message; fprintf(stderr, "%s\n", message.c_str()); + cuda_error_documentation(); } void cuda_push_context() @@ -161,6 +173,7 @@ public: CUDADevice(DeviceInfo& info, Stats &stats, bool background_) : Device(stats) { + first_error = true; background = background_; cuDevId = info.num;