Cycles: Fix possibly uninitialized variable

Hopefully this was a reason of randomly disappearing textures in our renders.
This commit is contained in:
Sergey Sharybin
2017-03-03 10:09:42 +01:00
parent df88d54284
commit 810d7d4694

View File

@@ -285,9 +285,8 @@ int ImageManager::add_image(const string& filename,
thread_scoped_lock device_lock(device_mutex); thread_scoped_lock device_lock(device_mutex);
/* Do we have a float? */ /* Check whether it's a float texture. */
if(type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4) is_float = (type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4);
is_float = true;
/* No single channel and half textures on CUDA (Fermi) and no half on OpenCL, use available slots */ /* No single channel and half textures on CUDA (Fermi) and no half on OpenCL, use available slots */
if((type == IMAGE_DATA_TYPE_FLOAT || if((type == IMAGE_DATA_TYPE_FLOAT ||