[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50363] trunk/blender/intern/cycles/render /osl.cpp: The shader id generated by the manager contains some special flags in high bits , leading to out-of-range index if used directly.
Lukas Toenne
lukas.toenne at googlemail.com
Mon Sep 3 20:51:00 CEST 2012
Revision: 50363
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50363
Author: lukastoenne
Date: 2012-09-03 18:50:59 +0000 (Mon, 03 Sep 2012)
Log Message:
-----------
The shader id generated by the manager contains some special flags in high bits, leading to out-of-range index if used directly. This must use the SHADER_MASK to get actual array index.
Modified Paths:
--------------
trunk/blender/intern/cycles/render/osl.cpp
Modified: trunk/blender/intern/cycles/render/osl.cpp
===================================================================
--- trunk/blender/intern/cycles/render/osl.cpp 2012-09-03 17:54:04 UTC (rev 50362)
+++ trunk/blender/intern/cycles/render/osl.cpp 2012-09-03 18:50:59 UTC (rev 50363)
@@ -102,7 +102,7 @@
/* setup shader engine */
og->ss = ss;
int background_id = scene->shader_manager->get_shader_id(scene->default_background);
- og->background_state = og->surface_state[background_id];
+ og->background_state = og->surface_state[background_id & SHADER_MASK];
og->use = true;
tls_create(OSLGlobals::ThreadData, og->thread_data);
More information about the Bf-blender-cvs
mailing list