ccl_device_inline float4 svm_image_texture_read(KernelGlobals *kg, int id, int offset)
{
- const texture_type = kernel_tex_type(id);
+ const int texture_type = kernel_tex_type(id);
/* Float4 */
if(texture_type == IMAGE_DATA_TYPE_FLOAT4) {
return kernel_tex_fetch(__tex_image_float4_packed, offset);
}
/* materials */
- if (ob->totcol != 0) {
- for (int a = 1; a <= ob->totcol; a++) {
- Material *ma = give_current_material(ob, a);
- if (ma != NULL) {
- build_material(ma);
- }
+ for (int a = 1; a <= ob->totcol; a++) {
+ Material *ma = give_current_material(ob, a);
+ if (ma != NULL) {
+ build_material(ma);
}
- add_operation_node(&ob->id,
- DEPSNODE_TYPE_SHADING,
- DEPSOP_TYPE_EXEC,
- NULL,
- DEG_OPCODE_PLACEHOLDER, "Material Update");
}
/* geometry collision */
}
/* materials */
- if (ob->totcol != 0) {
- ComponentKey object_shading_key(&ob->id, DEPSNODE_TYPE_SHADING);
+ if (ob->totcol) {
for (int a = 1; a <= ob->totcol; a++) {
Material *ma = give_current_material(ob, a);
if (ma != NULL) {
build_material(ma);
- ComponentKey material_shading_key(&ma->id,
- DEPSNODE_TYPE_SHADING);
- add_relation(material_shading_key,
- object_shading_key,
- DEPSREL_TYPE_UPDATE,
- "Object Shading");
}
}
- OperationKey obdata_geom_done_key(obdata,
- DEPSNODE_TYPE_GEOMETRY,
- DEG_OPCODE_PLACEHOLDER,
- "Eval Done");
- add_relation(geom_key,
- object_shading_key,
- DEPSREL_TYPE_UPDATE,
- "Object Shading");
}
/* geometry collision */