Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/image.cpp')
-rw-r--r--intern/cycles/render/image.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 218779e2978..4a1b06ed438 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -41,33 +41,33 @@ ImageManager::ImageManager(const DeviceInfo& info)
/* CPU */
if(info.type == DEVICE_CPU) {
- tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE_IMAGES_CPU;
+ tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE4_IMAGES_CPU;
tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_CPU;
- tex_image_byte_start = TEX_IMAGE_BYTE_START_CPU;
+ tex_image_byte4_start = TEX_IMAGE_BYTE4_START_CPU;
}
/* CUDA (Fermi) */
else if((info.type == DEVICE_CUDA || info.type == DEVICE_MULTI) && !info.extended_images) {
- tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE_IMAGES_CUDA;
+ tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE4_IMAGES_CUDA;
tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_CUDA;
- tex_image_byte_start = TEX_IMAGE_BYTE_START_CUDA;
+ tex_image_byte4_start = TEX_IMAGE_BYTE4_START_CUDA;
}
/* CUDA (Kepler and above) */
else if((info.type == DEVICE_CUDA || info.type == DEVICE_MULTI) && info.extended_images) {
- tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE_IMAGES_CUDA_KEPLER;
+ tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE4_IMAGES_CUDA_KEPLER;
tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_CUDA_KEPLER;
- tex_image_byte_start = TEX_IMAGE_BYTE_START_CUDA_KELPER;
+ tex_image_byte4_start = TEX_IMAGE_BYTE4_START_CUDA_KELPER;
}
/* OpenCL */
else if(info.pack_images) {
- tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE_IMAGES_OPENCL;
+ tex_num_images[IMAGE_DATA_TYPE_BYTE4] = TEX_NUM_BYTE4_IMAGES_OPENCL;
tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_OPENCL;
- tex_image_byte_start = TEX_IMAGE_BYTE_START_OPENCL;
+ tex_image_byte4_start = TEX_IMAGE_BYTE4_START_OPENCL;
}
/* Should never happen */
else {
tex_num_images[IMAGE_DATA_TYPE_BYTE4] = 0;
tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = 0;
- tex_image_byte_start = 0;
+ tex_image_byte4_start = 0;
assert(0);
}
}
@@ -172,16 +172,16 @@ bool ImageManager::is_float_image(const string& filename, void *builtin_data, bo
int ImageManager::type_index_to_flattened_slot(int slot, ImageDataType type)
{
if(type == IMAGE_DATA_TYPE_BYTE4)
- return slot + tex_image_byte_start;
+ return slot + tex_image_byte4_start;
else
return slot;
}
int ImageManager::flattened_slot_to_type_index(int flat_slot, ImageDataType *type)
{
- if(flat_slot >= tex_image_byte_start) {
+ if(flat_slot >= tex_image_byte4_start) {
*type = IMAGE_DATA_TYPE_BYTE4;
- return flat_slot - tex_image_byte_start;
+ return flat_slot - tex_image_byte4_start;
}
else {
*type = IMAGE_DATA_TYPE_FLOAT4;
@@ -669,7 +669,7 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, ImageD
}
}
else {
- device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
+ device_vector<uchar4>& tex_img = dscene->tex_byte4_image[slot];
if(tex_img.device_pointer) {
thread_scoped_lock device_lock(device_mutex);
@@ -689,9 +689,9 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, ImageD
string name;
int flat_slot = type_index_to_flattened_slot(slot, type);
- if(flat_slot >= 100) name = string_printf("__tex_image_byte_%d", flat_slot);
- else if(flat_slot >= 10) name = string_printf("__tex_image_byte_0%d", flat_slot);
- else name = string_printf("__tex_image_byte_00%d", flat_slot);
+ if(flat_slot >= 100) name = string_printf("__tex_image_byte4_%d", flat_slot);
+ else if(flat_slot >= 10) name = string_printf("__tex_image_byte4_0%d", flat_slot);
+ else name = string_printf("__tex_image_byte4_00%d", flat_slot);
if(!pack_images) {
thread_scoped_lock device_lock(device_mutex);
@@ -730,7 +730,7 @@ void ImageManager::device_free_image(Device *device, DeviceScene *dscene, ImageD
images[type][slot] = NULL;
}
else {
- device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
+ device_vector<uchar4>& tex_img = dscene->tex_byte4_image[slot];
if(tex_img.device_pointer) {
thread_scoped_lock device_lock(device_mutex);
@@ -814,7 +814,7 @@ void ImageManager::device_pack_images(Device *device,
if(!images[type][slot])
continue;
- device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
+ device_vector<uchar4>& tex_img = dscene->tex_byte4_image[slot];
size += tex_img.size();
}
@@ -827,7 +827,7 @@ void ImageManager::device_pack_images(Device *device,
if(!images[type][slot])
continue;
- device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
+ device_vector<uchar4>& tex_img = dscene->tex_byte4_image[slot];
/* todo: support 3D textures, only CPU for now */