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:
authorBrecht Van Lommel <brecht@blender.org>2020-02-26 19:31:33 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-11 19:07:17 +0300
commitf01bc597a8e6bf5df19f1af0c422918c96b25e41 (patch)
tree14e118d55e360186227c7d04d4f1ab6052acf2bf /intern/cycles/device/device_cpu.cpp
parent9910803574c4472e348ce140a49fc4fb212f9ee7 (diff)
Cleanup: stop encoding image data type in slot index
This is legacy code from when we had a fixed number of textures.
Diffstat (limited to 'intern/cycles/device/device_cpu.cpp')
-rw-r--r--intern/cycles/device/device_cpu.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index d11918ccbbf..56569a5ee3d 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -465,23 +465,24 @@ class CPUDevice : public Device {
}
else {
/* Image Texture. */
- int flat_slot = 0;
+ int slot = 0;
if (string_startswith(mem.name, "__tex_image")) {
int pos = string(mem.name).rfind("_");
- flat_slot = atoi(mem.name + pos + 1);
+ slot = atoi(mem.name + pos + 1);
}
else {
assert(0);
}
- if (flat_slot >= texture_info.size()) {
+ if (slot >= texture_info.size()) {
/* Allocate some slots in advance, to reduce amount
* of re-allocations. */
- texture_info.resize(flat_slot + 128);
+ texture_info.resize(slot + 128);
}
- TextureInfo &info = texture_info[flat_slot];
+ TextureInfo &info = texture_info[slot];
info.data = (uint64_t)mem.host_pointer;
+ info.data_type = mem.image_data_type;
info.cl_buffer = 0;
info.interpolation = mem.interpolation;
info.extension = mem.extension;