Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-09-03 22:50:59 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-09-03 22:50:59 +0400
commit9b30e8d83ac1294bb7a0956d57f5d00d61df703f (patch)
tree6bee6a90e129ba5293643c53c47b766f4d925658 /intern
parent192935eb0493e6b1685ad5e867b4d1c9a4ed112a (diff)
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.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/osl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index 04af9b48280..8bf32fdcb1a 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -102,7 +102,7 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
/* 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);