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/kernel/kernels/cuda/kernel_cuda_image.h
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/kernel/kernels/cuda/kernel_cuda_image.h')
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
index 7c68f08ea10..24bc3c7b59e 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
@@ -124,7 +124,7 @@ ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, fl
CUtexObject tex = (CUtexObject)info.data;
/* float4, byte4, ushort4 and half4 */
- const int texture_type = kernel_tex_type(id);
+ const int texture_type = info.data_type;
if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 ||
texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) {
if (info.interpolation == INTERPOLATION_CUBIC) {
@@ -156,7 +156,7 @@ ccl_device float4 kernel_tex_image_interp_3d(
CUtexObject tex = (CUtexObject)info.data;
uint interpolation = (interp == INTERPOLATION_NONE) ? info.interpolation : interp;
- const int texture_type = kernel_tex_type(id);
+ const int texture_type = info.data_type;
if (texture_type == IMAGE_DATA_TYPE_FLOAT4 || texture_type == IMAGE_DATA_TYPE_BYTE4 ||
texture_type == IMAGE_DATA_TYPE_HALF4 || texture_type == IMAGE_DATA_TYPE_USHORT4) {
if (interpolation == INTERPOLATION_CUBIC) {