Commit: 30c42d7353529daf32c216ef9a1694ac2b33cfc0
Author: Brecht Van Lommel
Date:   Mon Jun 9 12:38:46 2014 +0200
https://developer.blender.org/rB30c42d7353529daf32c216ef9a1694ac2b33cfc0

Fix cycles CUDA error when trying to use >= 100 image textures.

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

M       intern/cycles/render/image.cpp

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

diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 77cd6d5..f451310 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -576,7 +576,8 @@ void ImageManager::device_load_image(Device *device, 
DeviceScene *dscene, int sl
 
                string name;
 
-               if(slot >= 10) name = string_printf("__tex_image_float_0%d", 
slot);
+               if(slot >= 100) name = string_printf("__tex_image_float_%d", 
slot);
+               else if(slot >= 10) name = 
string_printf("__tex_image_float_0%d", slot);
                else name = string_printf("__tex_image_float_00%d", slot);
 
                if(!pack_images) {
@@ -607,7 +608,8 @@ void ImageManager::device_load_image(Device *device, 
DeviceScene *dscene, int sl
 
                string name;
 
-               if(slot >= 10) name = string_printf("__tex_image_0%d", slot);
+               if(slot >= 100) name = string_printf("__tex_image_%d", slot);
+               else if(slot >= 10) name = string_printf("__tex_image_0%d", 
slot);
                else name = string_printf("__tex_image_00%d", slot);
 
                if(!pack_images) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to