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
This commit is contained in:
parent
f593333099
commit
41a4967b30
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user