Cycles: Expose image image extension mapping to the image manager
Currently only two mappings are supported by API, which is Repeat (old behavior) and new Clip behavior. Internally this extension is being converted to periodic flag which was already supported but wasn't exposed. There's no support for OpenCL yet because of the way how we pack images into a single texture. Those settings are not exposed to UI or anywhere else and there should be no functional changes so far.
This commit is contained in:
@@ -38,7 +38,14 @@ void kernel_const_copy(KernelGlobals *kg, const char *name, void *host, size_t s
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t width, size_t height, size_t depth, InterpolationType interpolation)
|
||||
void kernel_tex_copy(KernelGlobals *kg,
|
||||
const char *name,
|
||||
device_ptr mem,
|
||||
size_t width,
|
||||
size_t height,
|
||||
size_t depth,
|
||||
InterpolationType interpolation,
|
||||
bool periodic)
|
||||
{
|
||||
if(0) {
|
||||
}
|
||||
@@ -64,6 +71,7 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
|
||||
tex->data = (float4*)mem;
|
||||
tex->dimensions_set(width, height, depth);
|
||||
tex->interpolation = interpolation;
|
||||
tex->periodic = periodic;
|
||||
}
|
||||
}
|
||||
else if(strstr(name, "__tex_image")) {
|
||||
@@ -79,6 +87,7 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
|
||||
tex->data = (uchar4*)mem;
|
||||
tex->dimensions_set(width, height, depth);
|
||||
tex->interpolation = interpolation;
|
||||
tex->periodic = periodic;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user