Cycles: avoid int->float conversions for pixel lookups

Gives ~3% speedup for image.blend test, and 6% for image heavy file.

Overall speedup in real-world use is likely much less.
This commit is contained in:
Campbell Barton
2014-05-05 06:57:33 +10:00
parent f7aac45488
commit ff34c2de64
2 changed files with 28 additions and 18 deletions

View File

@@ -61,9 +61,7 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
if(tex) {
tex->data = (float4*)mem;
tex->width = width;
tex->height = height;
tex->depth = depth;
tex->dimensions_set(width, height, depth);
tex->interpolation = interpolation;
}
}
@@ -78,9 +76,7 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
if(tex) {
tex->data = (uchar4*)mem;
tex->width = width;
tex->height = height;
tex->depth = depth;
tex->dimensions_set(width, height, depth);
tex->interpolation = interpolation;
}
}