Cycles: amd opencl compatibility fixes.

This commit is contained in:
Brecht Van Lommel
2011-08-10 14:26:51 +00:00
parent abc601d10e
commit b98ccf6998
5 changed files with 16 additions and 10 deletions

View File

@@ -140,14 +140,18 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
#endif
/* detect instancing, for non-instanced the object index is -object-1 */
#ifdef __INSTANCING__
bool instanced = false;
if(sd->prim != ~0) {
if(sd->object >= 0)
instanced = true;
else
#endif
sd->object = -sd->object-1;
#ifdef __INSTANCING__
}
#endif
/* smooth normal */
if(sd->shader < 0) {