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
diff options
context:
space:
mode:
authorMai Lavelle <mai.lavelle@gmail.com>2016-08-02 22:27:41 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2016-08-02 22:28:07 +0300
commit41a4967b301f2faaee5ab519f5373c3b6cab33c0 (patch)
treea1f3582c5dc3e2989a4be0d31cfb20e02c17dacb
parentf5933330998dc6c1aff9dc9fca32469717bf4dc3 (diff)
Fix T49003: Cycles volumes have wrong results after recent microdisp commits
Problem was that sd->prim can be -1 for volumes and was causing check in subd code to access out of bounds
-rw-r--r--intern/cycles/kernel/geom/geom_subd_triangle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h
index e4597aba56e..bf9be182345 100644
--- a/intern/cycles/kernel/geom/geom_subd_triangle.h
+++ b/intern/cycles/kernel/geom/geom_subd_triangle.h
@@ -22,7 +22,7 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline uint subd_triangle_patch(KernelGlobals *kg, const ShaderData *sd)
{
- return kernel_tex_fetch(__tri_patch, ccl_fetch(sd, prim));
+ return (ccl_fetch(sd, prim) != PRIM_NONE) ? kernel_tex_fetch(__tri_patch, ccl_fetch(sd, prim)) : ~0;
}
/* UV coords of triangle within patch */