diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-03 15:44:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-03 15:44:47 +0300 |
commit | be403891652a375e5a0ac61b493342ca6d39afb7 (patch) | |
tree | ef9637103db6d66c4b311cba5b705d575562a1f8 /intern/cycles/render/image.cpp | |
parent | 060fdb49d64857ff1cbf9937420ed70b10b17086 (diff) | |
parent | cbc7aa80d49e3b36c9ecc0e27ec528b34c491fc1 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render/image.cpp')
-rw-r--r-- | intern/cycles/render/image.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index 482442cce29..feaa17148ee 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -703,7 +703,7 @@ void ImageManager::device_load_image(Device *device, /* Slot assignment */ int flat_slot = type_index_to_flattened_slot(slot, type); - string name = string_printf("__tex_image_%s_%03d", name_from_type(type).c_str(), flat_slot); + img->mem_name = string_printf("__tex_image_%s_%03d", name_from_type(type).c_str(), flat_slot); /* Free previous texture in slot. */ if(img->mem) { @@ -715,7 +715,7 @@ void ImageManager::device_load_image(Device *device, /* Create new texture. */ if(type == IMAGE_DATA_TYPE_FLOAT4) { device_vector<float4> *tex_img - = new device_vector<float4>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<float4>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::FLOAT, float>(img, type, @@ -741,7 +741,7 @@ void ImageManager::device_load_image(Device *device, } else if(type == IMAGE_DATA_TYPE_FLOAT) { device_vector<float> *tex_img - = new device_vector<float>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<float>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::FLOAT, float>(img, type, @@ -764,7 +764,7 @@ void ImageManager::device_load_image(Device *device, } else if(type == IMAGE_DATA_TYPE_BYTE4) { device_vector<uchar4> *tex_img - = new device_vector<uchar4>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<uchar4>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::UINT8, uchar>(img, type, @@ -790,7 +790,7 @@ void ImageManager::device_load_image(Device *device, } else if(type == IMAGE_DATA_TYPE_BYTE) { device_vector<uchar> *tex_img - = new device_vector<uchar>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<uchar>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::UINT8, uchar>(img, type, @@ -812,7 +812,7 @@ void ImageManager::device_load_image(Device *device, } else if(type == IMAGE_DATA_TYPE_HALF4) { device_vector<half4> *tex_img - = new device_vector<half4>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<half4>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::HALF, half>(img, type, @@ -837,7 +837,7 @@ void ImageManager::device_load_image(Device *device, } else if(type == IMAGE_DATA_TYPE_HALF) { device_vector<half> *tex_img - = new device_vector<half>(device, name.c_str(), MEM_TEXTURE); + = new device_vector<half>(device, img->mem_name.c_str(), MEM_TEXTURE); if(!file_load_image<TypeDesc::HALF, half>(img, type, |