Cleanup: Rename texture slots to float4 and byte, to distinguish from future float...
authorThomas Dinges <blender@dingto.org>
Fri, 6 May 2016 11:42:50 +0000 (13:42 +0200)
committerThomas Dinges <blender@dingto.org>
Fri, 6 May 2016 12:37:35 +0000 (14:37 +0200)
Should be no functional changes, tested CPU and CUDA.

intern/cycles/device/device_cuda.cpp
intern/cycles/kernel/geom/geom_volume.h
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/kernel_globals.h
intern/cycles/kernel/kernel_textures.h
intern/cycles/kernel/kernels/cpu/kernel.cpp
intern/cycles/kernel/svm/svm_image.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/scene.h
intern/cycles/util/util_texture.h

index f1a17d652da981cead5b1221f47a6fb013545646..f7c985e787dc8efe2feeae16c34e286bff1f9061 100644 (file)
@@ -483,7 +483,7 @@ public:
                         */
                        vector<string> tokens;
                        string_split(tokens, name, "_");
                         */
                        vector<string> tokens;
                        string_split(tokens, name, "_");
-                       bind_name = string_printf("__tex_image_%s3d_%s",
+                       bind_name = string_printf("__tex_image_%s_3d_%s",
                                                  tokens[2].c_str(),
                                                  tokens[3].c_str());
                }
                                                  tokens[2].c_str(),
                                                  tokens[3].c_str());
                }
index 14b6738b23e970400e120fabfb02b0c57410a448..7bd3933a1f80b617c3e929f058e4ea3e8b65084f 100644 (file)
@@ -34,11 +34,11 @@ ccl_device float4 volume_image_texture_3d(int id, float x, float y, float z)
 {
        float4 r;
        switch(id) {
 {
        float4 r;
        switch(id) {
-               case 0: r = kernel_tex_image_interp_3d(__tex_image_float3d_000, x, y, z); break;
-               case 1: r = kernel_tex_image_interp_3d(__tex_image_float3d_001, x, y, z); break;
-               case 2: r = kernel_tex_image_interp_3d(__tex_image_float3d_002, x, y, z); break;
-               case 3: r = kernel_tex_image_interp_3d(__tex_image_float3d_003, x, y, z); break;
-               case 4: r = kernel_tex_image_interp_3d(__tex_image_float3d_004, x, y, z); break;
+               case 0: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_000, x, y, z); break;
+               case 1: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_001, x, y, z); break;
+               case 2: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_002, x, y, z); break;
+               case 3: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_003, x, y, z); break;
+               case 4: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_004, x, y, z); break;
        }
        return r;
 }
        }
        return r;
 }
index b96a84499b45477aa339d9b53e2d1981ee9e5e1b..6e56f1e21fa9cb0f7feebdc1c6ccf6b13f15668b 100644 (file)
@@ -479,9 +479,9 @@ typedef texture_image<uchar4> texture_image_uchar4;
 #define kernel_tex_fetch_ssef(tex, index) (kg->tex.fetch_ssef(index))
 #define kernel_tex_fetch_ssei(tex, index) (kg->tex.fetch_ssei(index))
 #define kernel_tex_lookup(tex, t, offset, size) (kg->tex.lookup(t, offset, size))
 #define kernel_tex_fetch_ssef(tex, index) (kg->tex.fetch_ssef(index))
 #define kernel_tex_fetch_ssei(tex, index) (kg->tex.fetch_ssei(index))
 #define kernel_tex_lookup(tex, t, offset, size) (kg->tex.lookup(t, offset, size))
-#define kernel_tex_image_interp(tex, x, y) ((tex < MAX_FLOAT_IMAGES) ? kg->texture_float_images[tex].interp(x, y) : kg->texture_byte_images[tex - MAX_FLOAT_IMAGES].interp(x, y))
-#define kernel_tex_image_interp_3d(tex, x, y, z) ((tex < MAX_FLOAT_IMAGES) ? kg->texture_float_images[tex].interp_3d(x, y, z) : kg->texture_byte_images[tex - MAX_FLOAT_IMAGES].interp_3d(x, y, z))
-#define kernel_tex_image_interp_3d_ex(tex, x, y, z, interpolation) ((tex < MAX_FLOAT_IMAGES) ? kg->texture_float_images[tex].interp_3d_ex(x, y, z, interpolation) : kg->texture_byte_images[tex - MAX_FLOAT_IMAGES].interp_3d_ex(x, y, z, interpolation))
+#define kernel_tex_image_interp(tex, x, y) ((tex < MAX_FLOAT4_IMAGES) ? kg->texture_float4_images[tex].interp(x, y) : kg->texture_byte_images[tex - MAX_FLOAT4_IMAGES].interp(x, y))
+#define kernel_tex_image_interp_3d(tex, x, y, z) ((tex < MAX_FLOAT4_IMAGES) ? kg->texture_float4_images[tex].interp_3d(x, y, z) : kg->texture_byte_images[tex - MAX_FLOAT4_IMAGES].interp_3d(x, y, z))
+#define kernel_tex_image_interp_3d_ex(tex, x, y, z, interpolation) ((tex < MAX_FLOAT4_IMAGES) ? kg->texture_float4_images[tex].interp_3d_ex(x, y, z, interpolation) : kg->texture_byte_images[tex - MAX_FLOAT4_IMAGES].interp_3d_ex(x, y, z, interpolation))
 
 #define kernel_data (kg->__data)
 
 
 #define kernel_data (kg->__data)
 
index 52e718f8efd6191a7ae448e738e693a94b2c1a3d..329123943d9d34c4a0bb1362007a864506a6a72c 100644 (file)
@@ -32,11 +32,11 @@ struct OSLShadingSystem;
 #  endif
 
 #  define MAX_BYTE_IMAGES   1024
 #  endif
 
 #  define MAX_BYTE_IMAGES   1024
-#  define MAX_FLOAT_IMAGES  1024
+#  define MAX_FLOAT4_IMAGES  1024
 
 typedef struct KernelGlobals {
        texture_image_uchar4 texture_byte_images[MAX_BYTE_IMAGES];
 
 typedef struct KernelGlobals {
        texture_image_uchar4 texture_byte_images[MAX_BYTE_IMAGES];
-       texture_image_float4 texture_float_images[MAX_FLOAT_IMAGES];
+       texture_image_float4 texture_float4_images[MAX_FLOAT4_IMAGES];
 
 #  define KERNEL_TEX(type, ttype, name) ttype name;
 #  define KERNEL_IMAGE_TEX(type, ttype, name)
 
 #  define KERNEL_TEX(type, ttype, name) ttype name;
 #  define KERNEL_IMAGE_TEX(type, ttype, name)
index 2a048b7e3f2f13393263ee2a80c7e1caf0b6ce16..12eb8849c2fe4fcf747155fc9fe55bfbab12bd5f 100644 (file)
@@ -73,167 +73,167 @@ KERNEL_TEX(float, texture_float, __lookup_table)
 KERNEL_TEX(uint, texture_uint, __sobol_directions)
 
 /* full-float image */
 KERNEL_TEX(uint, texture_uint, __sobol_directions)
 
 /* full-float image */
-KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float_000)
-KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float_001)
-KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float_002)
-KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float_003)
-KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float_004)
-
-KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float3d_000)
-KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float3d_001)
-KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float3d_002)
-KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float3d_003)
-KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float3d_004)
+KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_000)
+KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_001)
+KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_002)
+KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_003)
+KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_004)
+
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_000)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_001)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_002)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_003)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_004)
 
 /* image */
 
 /* image */
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_005)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_006)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_007)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_008)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_009)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_010)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_011)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_012)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_013)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_014)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_015)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_016)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_017)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_018)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_019)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_020)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_021)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_022)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_023)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_024)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_025)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_026)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_027)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_028)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_029)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_030)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_031)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_032)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_033)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_034)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_035)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_036)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_037)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_038)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_039)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_040)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_041)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_042)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_043)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_044)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_045)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_046)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_047)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_048)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_049)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_050)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_051)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_052)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_053)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_054)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_055)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_056)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_057)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_058)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_059)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_060)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_061)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_062)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_063)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_064)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_065)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_066)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_067)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_068)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_069)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_070)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_071)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_072)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_073)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_074)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_075)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_076)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_077)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_078)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_079)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_080)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_081)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_082)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_083)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_084)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_085)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_086)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_087)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_088)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_089)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_090)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_091)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_092)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_093)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_094)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_095)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_096)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_097)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_098)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_005)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_006)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_007)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_008)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_009)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_010)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_011)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_012)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_013)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_014)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_015)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_016)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_017)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_018)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_019)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_020)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_021)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_022)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_023)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_024)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_025)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_026)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_027)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_028)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_029)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_030)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_031)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_032)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_033)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_034)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_035)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_036)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_037)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_038)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_039)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_040)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_041)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_042)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_043)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_044)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_045)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_046)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_047)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_048)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_049)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_050)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_051)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_052)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_053)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_054)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_055)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_056)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_057)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_058)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_059)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_060)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_061)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_062)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_063)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_064)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_065)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_066)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_067)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_068)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_069)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_070)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_071)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_072)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_073)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_074)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_075)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_076)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_077)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_078)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_079)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_080)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_081)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_082)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_083)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_084)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_085)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_086)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_087)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_088)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_089)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_090)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_091)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_092)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_093)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_094)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_095)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_096)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_097)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_098)
 
 /* Kepler and above */
 
 /* Kepler and above */
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_099)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_100)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_101)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_102)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_103)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_104)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_105)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_106)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_107)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_108)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_109)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_110)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_111)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_112)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_113)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_114)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_115)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_116)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_117)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_118)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_119)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_120)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_121)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_122)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_123)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_124)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_125)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_126)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_127)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_128)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_129)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_130)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_131)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_132)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_133)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_134)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_135)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_136)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_137)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_138)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_139)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_140)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_141)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_142)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_143)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_144)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_145)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_146)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_147)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_148)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_149)
-KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_150)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_099)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_100)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_101)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_102)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_103)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_104)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_105)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_106)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_107)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_108)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_109)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_110)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_111)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_112)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_113)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_114)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_115)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_116)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_117)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_118)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_119)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_120)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_121)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_122)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_123)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_124)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_125)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_126)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_127)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_128)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_129)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_130)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_131)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_132)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_133)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_134)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_135)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_136)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_137)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_138)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_139)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_140)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_141)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_142)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_143)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_144)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_145)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_146)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_147)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_148)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_149)
+KERNEL_IMAGE_TEX(uchar4, texture_image_uchar4, __tex_image_byte_150)
 
 /* packed image (opencl) */
 KERNEL_TEX(uchar4, texture_uchar4, __tex_image_packed)
 
 /* packed image (opencl) */
 KERNEL_TEX(uchar4, texture_uchar4, __tex_image_packed)
index 45091f6f33dde298a68fd1bd6b94312dfb7f0529..5fa95f29613a125a808d914a339b91fee6929e61 100644 (file)
@@ -90,13 +90,13 @@ void kernel_tex_copy(KernelGlobals *kg,
 #define KERNEL_IMAGE_TEX(type, ttype, tname)
 #include "kernel_textures.h"
 
 #define KERNEL_IMAGE_TEX(type, ttype, tname)
 #include "kernel_textures.h"
 
-       else if(strstr(name, "__tex_image_float")) {
+       else if(strstr(name, "__tex_image_float4")) {
                texture_image_float4 *tex = NULL;
                texture_image_float4 *tex = NULL;
-               int id = atoi(name + strlen("__tex_image_float_"));
+               int id = atoi(name + strlen("__tex_image_float4_"));
                int array_index = id;
 
                int array_index = id;
 
-               if(array_index >= 0 && array_index < MAX_FLOAT_IMAGES) {
-                       tex = &kg->texture_float_images[array_index];
+               if(array_index >= 0 && array_index < MAX_FLOAT4_IMAGES) {
+                       tex = &kg->texture_float4_images[array_index];
                }
 
                if(tex) {
                }
 
                if(tex) {
@@ -106,10 +106,10 @@ void kernel_tex_copy(KernelGlobals *kg,
                        tex->extension = extension;
                }
        }
                        tex->extension = extension;
                }
        }
-       else if(strstr(name, "__tex_image")) {
+       else if(strstr(name, "__tex_image_byte")) {
                texture_image_uchar4 *tex = NULL;
                texture_image_uchar4 *tex = NULL;
-               int id = atoi(name + strlen("__tex_image_"));
-               int array_index = id - MAX_FLOAT_IMAGES;
+               int id = atoi(name + strlen("__tex_image_byte_"));
+               int array_index = id - MAX_FLOAT4_IMAGES;
 
                if(array_index >= 0 && array_index < MAX_BYTE_IMAGES) {
                        tex = &kg->texture_byte_images[array_index];
 
                if(array_index >= 0 && array_index < MAX_BYTE_IMAGES) {
                        tex = &kg->texture_byte_images[array_index];
index 07ab2f285771f45078c15bdb5e778afa844e8d52..d950fc45b11c712c6d9946c186edbb7d82ed72ed 100644 (file)
 
 CCL_NAMESPACE_BEGIN
 
 
 CCL_NAMESPACE_BEGIN
 
-/* Float textures on various devices. */
+/* Float4 textures on various devices. */
 #if defined(__KERNEL_CPU__)
 #if defined(__KERNEL_CPU__)
-  #define TEX_NUM_FLOAT_IMAGES TEX_NUM_FLOAT_IMAGES_CPU
+  #define TEX_NUM_FLOAT4_IMAGES        TEX_NUM_FLOAT4_IMAGES_CPU
 #elif defined(__KERNEL_CUDA__)
 #elif defined(__KERNEL_CUDA__)
-  #define TEX_NUM_FLOAT_IMAGES TEX_NUM_FLOAT_IMAGES_CUDA
+  #define TEX_NUM_FLOAT4_IMAGES        TEX_NUM_FLOAT4_IMAGES_CUDA
 #else
 #else
-  #define TEX_NUM_FLOAT_IMAGES TEX_NUM_FLOAT_IMAGES_OPENCL
+  #define TEX_NUM_FLOAT4_IMAGES        TEX_NUM_FLOAT4_IMAGES_OPENCL
 #endif
 
 #ifdef __KERNEL_OPENCL__
 #endif
 
 #ifdef __KERNEL_OPENCL__
@@ -115,7 +115,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
                r.y *= invw;
                r.z *= invw;
 
                r.y *= invw;
                r.z *= invw;
 
-               if(id >= TEX_NUM_FLOAT_IMAGES) {
+               if(id >= TEX_NUM_FLOAT4_IMAGES) {
                        r.x = min(r.x, 1.0f);
                        r.y = min(r.y, 1.0f);
                        r.z = min(r.z, 1.0f);
                        r.x = min(r.x, 1.0f);
                        r.y = min(r.y, 1.0f);
                        r.z = min(r.z, 1.0f);
@@ -156,159 +156,159 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
         * and we cannot use all since we still need some for other storage */
 
        switch(id) {
         * and we cannot use all since we still need some for other storage */
 
        switch(id) {
-               case 0: r = kernel_tex_image_interp(__tex_image_float_000, x, y); break;
-               case 1: r = kernel_tex_image_interp(__tex_image_float_001, x, y); break;
-               case 2: r = kernel_tex_image_interp(__tex_image_float_002, x, y); break;
-               case 3: r = kernel_tex_image_interp(__tex_image_float_003, x, y); break;
-               case 4: r = kernel_tex_image_interp(__tex_image_float_004, x, y); break;
-               case 5: r = kernel_tex_image_interp(__tex_image_005, x, y); break;
-               case 6: r = kernel_tex_image_interp(__tex_image_006, x, y); break;
-               case 7: r = kernel_tex_image_interp(__tex_image_007, x, y); break;
-               case 8: r = kernel_tex_image_interp(__tex_image_008, x, y); break;
-               case 9: r = kernel_tex_image_interp(__tex_image_009, x, y); break;
-               case 10: r = kernel_tex_image_interp(__tex_image_010, x, y); break;
-               case 11: r = kernel_tex_image_interp(__tex_image_011, x, y); break;
-               case 12: r = kernel_tex_image_interp(__tex_image_012, x, y); break;
-               case 13: r = kernel_tex_image_interp(__tex_image_013, x, y); break;
-               case 14: r = kernel_tex_image_interp(__tex_image_014, x, y); break;
-               case 15: r = kernel_tex_image_interp(__tex_image_015, x, y); break;
-               case 16: r = kernel_tex_image_interp(__tex_image_016, x, y); break;
-               case 17: r = kernel_tex_image_interp(__tex_image_017, x, y); break;
-               case 18: r = kernel_tex_image_interp(__tex_image_018, x, y); break;
-               case 19: r = kernel_tex_image_interp(__tex_image_019, x, y); break;
-               case 20: r = kernel_tex_image_interp(__tex_image_020, x, y); break;
-               case 21: r = kernel_tex_image_interp(__tex_image_021, x, y); break;
-               case 22: r = kernel_tex_image_interp(__tex_image_022, x, y); break;
-               case 23: r = kernel_tex_image_interp(__tex_image_023, x, y); break;
-               case 24: r = kernel_tex_image_interp(__tex_image_024, x, y); break;
-               case 25: r = kernel_tex_image_interp(__tex_image_025, x, y); break;
-               case 26: r = kernel_tex_image_interp(__tex_image_026, x, y); break;
-               case 27: r = kernel_tex_image_interp(__tex_image_027, x, y); break;
-               case 28: r = kernel_tex_image_interp(__tex_image_028, x, y); break;
-               case 29: r = kernel_tex_image_interp(__tex_image_029, x, y); break;
-               case 30: r = kernel_tex_image_interp(__tex_image_030, x, y); break;
-               case 31: r = kernel_tex_image_interp(__tex_image_031, x, y); break;
-               case 32: r = kernel_tex_image_interp(__tex_image_032, x, y); break;
-               case 33: r = kernel_tex_image_interp(__tex_image_033, x, y); break;
-               case 34: r = kernel_tex_image_interp(__tex_image_034, x, y); break;
-               case 35: r = kernel_tex_image_interp(__tex_image_035, x, y); break;
-               case 36: r = kernel_tex_image_interp(__tex_image_036, x, y); break;
-               case 37: r = kernel_tex_image_interp(__tex_image_037, x, y); break;
-               case 38: r = kernel_tex_image_interp(__tex_image_038, x, y); break;
-               case 39: r = kernel_tex_image_interp(__tex_image_039, x, y); break;
-               case 40: r = kernel_tex_image_interp(__tex_image_040, x, y); break;
-               case 41: r = kernel_tex_image_interp(__tex_image_041, x, y); break;
-               case 42: r = kernel_tex_image_interp(__tex_image_042, x, y); break;
-               case 43: r = kernel_tex_image_interp(__tex_image_043, x, y); break;
-               case 44: r = kernel_tex_image_interp(__tex_image_044, x, y); break;
-               case 45: r = kernel_tex_image_interp(__tex_image_045, x, y); break;
-               case 46: r = kernel_tex_image_interp(__tex_image_046, x, y); break;
-               case 47: r = kernel_tex_image_interp(__tex_image_047, x, y); break;
-               case 48: r = kernel_tex_image_interp(__tex_image_048, x, y); break;
-               case 49: r = kernel_tex_image_interp(__tex_image_049, x, y); break;
-               case 50: r = kernel_tex_image_interp(__tex_image_050, x, y); break;
-               case 51: r = kernel_tex_image_interp(__tex_image_051, x, y); break;
-               case 52: r = kernel_tex_image_interp(__tex_image_052, x, y); break;
-               case 53: r = kernel_tex_image_interp(__tex_image_053, x, y); break;
-               case 54: r = kernel_tex_image_interp(__tex_image_054, x, y); break;
-               case 55: r = kernel_tex_image_interp(__tex_image_055, x, y); break;
-               case 56: r = kernel_tex_image_interp(__tex_image_056, x, y); break;
-               case 57: r = kernel_tex_image_interp(__tex_image_057, x, y); break;
-               case 58: r = kernel_tex_image_interp(__tex_image_058, x, y); break;
-               case 59: r = kernel_tex_image_interp(__tex_image_059, x, y); break;
-               case 60: r = kernel_tex_image_interp(__tex_image_060, x, y); break;
-               case 61: r = kernel_tex_image_interp(__tex_image_061, x, y); break;
-               case 62: r = kernel_tex_image_interp(__tex_image_062, x, y); break;
-               case 63: r = kernel_tex_image_interp(__tex_image_063, x, y); break;
-               case 64: r = kernel_tex_image_interp(__tex_image_064, x, y); break;
-               case 65: r = kernel_tex_image_interp(__tex_image_065, x, y); break;
-               case 66: r = kernel_tex_image_interp(__tex_image_066, x, y); break;
-               case 67: r = kernel_tex_image_interp(__tex_image_067, x, y); break;
-               case 68: r = kernel_tex_image_interp(__tex_image_068, x, y); break;
-               case 69: r = kernel_tex_image_interp(__tex_image_069, x, y); break;
-               case 70: r = kernel_tex_image_interp(__tex_image_070, x, y); break;
-               case 71: r = kernel_tex_image_interp(__tex_image_071, x, y); break;
-               case 72: r = kernel_tex_image_interp(__tex_image_072, x, y); break;
-               case 73: r = kernel_tex_image_interp(__tex_image_073, x, y); break;
-               case 74: r = kernel_tex_image_interp(__tex_image_074, x, y); break;
-               case 75: r = kernel_tex_image_interp(__tex_image_075, x, y); break;
-               case 76: r = kernel_tex_image_interp(__tex_image_076, x, y); break;
-               case 77: r = kernel_tex_image_interp(__tex_image_077, x, y); break;
-               case 78: r = kernel_tex_image_interp(__tex_image_078, x, y); break;
-               case 79: r = kernel_tex_image_interp(__tex_image_079, x, y); break;
-               case 80: r = kernel_tex_image_interp(__tex_image_080, x, y); break;
-               case 81: r = kernel_tex_image_interp(__tex_image_081, x, y); break;
-               case 82: r = kernel_tex_image_interp(__tex_image_082, x, y); break;
-               case 83: r = kernel_tex_image_interp(__tex_image_083, x, y); break;
-               case 84: r = kernel_tex_image_interp(__tex_image_084, x, y); break;
-               case 85: r = kernel_tex_image_interp(__tex_image_085, x, y); break;
-               case 86: r = kernel_tex_image_interp(__tex_image_086, x, y); break;
-               case 87: r = kernel_tex_image_interp(__tex_image_087, x, y); break;
-               case 88: r = kernel_tex_image_interp(__tex_image_088, x, y); break;
-               case 89: r = kernel_tex_image_interp(__tex_image_089, x, y); break;
-               case 90: r = kernel_tex_image_interp(__tex_image_090, x, y); break;
-               case 91: r = kernel_tex_image_interp(__tex_image_091, x, y); break;
-               case 92: r = kernel_tex_image_interp(__tex_image_092, x, y); break;
+               case 0: r = kernel_tex_image_interp(__tex_image_float4_000, x, y); break;
+               case 1: r = kernel_tex_image_interp(__tex_image_float4_001, x, y); break;
+               case 2: r = kernel_tex_image_interp(__tex_image_float4_002, x, y); break;
+               case 3: r = kernel_tex_image_interp(__tex_image_float4_003, x, y); break;
+               case 4: r = kernel_tex_image_interp(__tex_image_float4_004, x, y); break;
+               case 5: r = kernel_tex_image_interp(__tex_image_byte_005, x, y); break;
+               case 6: r = kernel_tex_image_interp(__tex_image_byte_006, x, y); break;
+               case 7: r = kernel_tex_image_interp(__tex_image_byte_007, x, y); break;
+               case 8: r = kernel_tex_image_interp(__tex_image_byte_008, x, y); break;
+               case 9: r = kernel_tex_image_interp(__tex_image_byte_009, x, y); break;
+               case 10: r = kernel_tex_image_interp(__tex_image_byte_010, x, y); break;
+               case 11: r = kernel_tex_image_interp(__tex_image_byte_011, x, y); break;
+               case 12: r = kernel_tex_image_interp(__tex_image_byte_012, x, y); break;
+               case 13: r = kernel_tex_image_interp(__tex_image_byte_013, x, y); break;
+               case 14: r = kernel_tex_image_interp(__tex_image_byte_014, x, y); break;
+               case 15: r = kernel_tex_image_interp(__tex_image_byte_015, x, y); break;
+               case 16: r = kernel_tex_image_interp(__tex_image_byte_016, x, y); break;
+               case 17: r = kernel_tex_image_interp(__tex_image_byte_017, x, y); break;
+               case 18: r = kernel_tex_image_interp(__tex_image_byte_018, x, y); break;
+               case 19: r = kernel_tex_image_interp(__tex_image_byte_019, x, y); break;
+               case 20: r = kernel_tex_image_interp(__tex_image_byte_020, x, y); break;
+               case 21: r = kernel_tex_image_interp(__tex_image_byte_021, x, y); break;
+               case 22: r = kernel_tex_image_interp(__tex_image_byte_022, x, y); break;
+               case 23: r = kernel_tex_image_interp(__tex_image_byte_023, x, y); break;
+               case 24: r = kernel_tex_image_interp(__tex_image_byte_024, x, y); break;
+               case 25: r = kernel_tex_image_interp(__tex_image_byte_025, x, y); break;
+               case 26: r = kernel_tex_image_interp(__tex_image_byte_026, x, y); break;
+               case 27: r = kernel_tex_image_interp(__tex_image_byte_027, x, y); break;
+               case 28: r = kernel_tex_image_interp(__tex_image_byte_028, x, y); break;
+               case 29: r = kernel_tex_image_interp(__tex_image_byte_029, x, y); break;
+               case 30: r = kernel_tex_image_interp(__tex_image_byte_030, x, y); break;
+               case 31: r = kernel_tex_image_interp(__tex_image_byte_031, x, y); break;
+               case 32: r = kernel_tex_image_interp(__tex_image_byte_032, x, y); break;
+               case 33: r = kernel_tex_image_interp(__tex_image_byte_033, x, y); break;
+               case 34: r = kernel_tex_image_interp(__tex_image_byte_034, x, y); break;
+               case 35: r = kernel_tex_image_interp(__tex_image_byte_035, x, y); break;
+               case 36: r = kernel_tex_image_interp(__tex_image_byte_036, x, y); break;
+               case 37: r = kernel_tex_image_interp(__tex_image_byte_037, x, y); break;
+               case 38: r = kernel_tex_image_interp(__tex_image_byte_038, x, y); break;
+               case 39: r = kernel_tex_image_interp(__tex_image_byte_039, x, y); break;
+               case 40: r = kernel_tex_image_interp(__tex_image_byte_040, x, y); break;
+               case 41: r = kernel_tex_image_interp(__tex_image_byte_041, x, y); break;
+               case 42: r = kernel_tex_image_interp(__tex_image_byte_042, x, y); break;
+               case 43: r = kernel_tex_image_interp(__tex_image_byte_043, x, y); break;
+               case 44: r = kernel_tex_image_interp(__tex_image_byte_044, x, y); break;
+               case 45: r = kernel_tex_image_interp(__tex_image_byte_045, x, y); break;
+               case 46: r = kernel_tex_image_interp(__tex_image_byte_046, x, y); break;
+               case 47: r = kernel_tex_image_interp(__tex_image_byte_047, x, y); break;
+               case 48: r = kernel_tex_image_interp(__tex_image_byte_048, x, y); break;
+               case 49: r = kernel_tex_image_interp(__tex_image_byte_049, x, y); break;
+               case 50: r = kernel_tex_image_interp(__tex_image_byte_050, x, y); break;
+               case 51: r = kernel_tex_image_interp(__tex_image_byte_051, x, y); break;
+               case 52: r = kernel_tex_image_interp(__tex_image_byte_052, x, y); break;
+               case 53: r = kernel_tex_image_interp(__tex_image_byte_053, x, y); break;
+               case 54: r = kernel_tex_image_interp(__tex_image_byte_054, x, y); break;
+               case 55: r = kernel_tex_image_interp(__tex_image_byte_055, x, y); break;
+               case 56: r = kernel_tex_image_interp(__tex_image_byte_056, x, y); break;
+               case 57: r = kernel_tex_image_interp(__tex_image_byte_057, x, y); break;
+               case 58: r = kernel_tex_image_interp(__tex_image_byte_058, x, y); break;
+               case 59: r = kernel_tex_image_interp(__tex_image_byte_059, x, y); break;
+               case 60: r = kernel_tex_image_interp(__tex_image_byte_060, x, y); break;
+               case 61: r = kernel_tex_image_interp(__tex_image_byte_061, x, y); break;
+               case 62: r = kernel_tex_image_interp(__tex_image_byte_062, x, y); break;
+               case 63: r = kernel_tex_image_interp(__tex_image_byte_063, x, y); break;
+               case 64: r = kernel_tex_image_interp(__tex_image_byte_064, x, y); break;
+               case 65: r = kernel_tex_image_interp(__tex_image_byte_065, x, y); break;
+               case 66: r = kernel_tex_image_interp(__tex_image_byte_066, x, y); break;
+               case 67: r = kernel_tex_image_interp(__tex_image_byte_067, x, y); break;
+               case 68: r = kernel_tex_image_interp(__tex_image_byte_068, x, y); break;
+               case 69: r = kernel_tex_image_interp(__tex_image_byte_069, x, y); break;
+               case 70: r = kernel_tex_image_interp(__tex_image_byte_070, x, y); break;
+               case 71: r = kernel_tex_image_interp(__tex_image_byte_071, x, y); break;
+               case 72: r = kernel_tex_image_interp(__tex_image_byte_072, x, y); break;
+               case 73: r = kernel_tex_image_interp(__tex_image_byte_073, x, y); break;
+               case 74: r = kernel_tex_image_interp(__tex_image_byte_074, x, y); break;
+               case 75: r = kernel_tex_image_interp(__tex_image_byte_075, x, y); break;
+               case 76: r = kernel_tex_image_interp(__tex_image_byte_076, x, y); break;
+               case 77: r = kernel_tex_image_interp(__tex_image_byte_077, x, y); break;
+               case 78: r = kernel_tex_image_interp(__tex_image_byte_078, x, y); break;
+               case 79: r = kernel_tex_image_interp(__tex_image_byte_079, x, y); break;
+               case 80: r = kernel_tex_image_interp(__tex_image_byte_080, x, y); break;
+               case 81: r = kernel_tex_image_interp(__tex_image_byte_081, x, y); break;
+               case 82: r = kernel_tex_image_interp(__tex_image_byte_082, x, y); break;
+               case 83: r = kernel_tex_image_interp(__tex_image_byte_083, x, y); break;
+               case 84: r = kernel_tex_image_interp(__tex_image_byte_084, x, y); break;
+               case 85: r = kernel_tex_image_interp(__tex_image_byte_085, x, y); break;
+               case 86: r = kernel_tex_image_interp(__tex_image_byte_086, x, y); break;
+               case 87: r = kernel_tex_image_interp(__tex_image_byte_087, x, y); break;
+               case 88: r = kernel_tex_image_interp(__tex_image_byte_088, x, y); break;
+               case 89: r = kernel_tex_image_interp(__tex_image_byte_089, x, y); break;
+               case 90: r = kernel_tex_image_interp(__tex_image_byte_090, x, y); break;
+               case 91: r = kernel_tex_image_interp(__tex_image_byte_091, x, y); break;
+               case 92: r = kernel_tex_image_interp(__tex_image_byte_092, x, y); break;
 
 #  if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 300)
 
 #  if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 300)
-               case 93: r = kernel_tex_image_interp(__tex_image_093, x, y); break;
-               case 94: r = kernel_tex_image_interp(__tex_image_094, x, y); break;
-               case 95: r = kernel_tex_image_interp(__tex_image_095, x, y); break;
-               case 96: r = kernel_tex_image_interp(__tex_image_096, x, y); break;
-               case 97: r = kernel_tex_image_interp(__tex_image_097, x, y); break;
-               case 98: r = kernel_tex_image_interp(__tex_image_098, x, y); break;
-               case 99: r = kernel_tex_image_interp(__tex_image_099, x, y); break;
-               case 100: r = kernel_tex_image_interp(__tex_image_100, x, y); break;
-               case 101: r = kernel_tex_image_interp(__tex_image_101, x, y); break;
-               case 102: r = kernel_tex_image_interp(__tex_image_102, x, y); break;
-               case 103: r = kernel_tex_image_interp(__tex_image_103, x, y); break;
-               case 104: r = kernel_tex_image_interp(__tex_image_104, x, y); break;
-               case 105: r = kernel_tex_image_interp(__tex_image_105, x, y); break;
-               case 106: r = kernel_tex_image_interp(__tex_image_106, x, y); break;
-               case 107: r = kernel_tex_image_interp(__tex_image_107, x, y); break;
-               case 108: r = kernel_tex_image_interp(__tex_image_108, x, y); break;
-               case 109: r = kernel_tex_image_interp(__tex_image_109, x, y); break;
-               case 110: r = kernel_tex_image_interp(__tex_image_110, x, y); break;
-               case 111: r = kernel_tex_image_interp(__tex_image_111, x, y); break;
-               case 112: r = kernel_tex_image_interp(__tex_image_112, x, y); break;
-               case 113: r = kernel_tex_image_interp(__tex_image_113, x, y); break;
-               case 114: r = kernel_tex_image_interp(__tex_image_114, x, y); break;
-               case 115: r = kernel_tex_image_interp(__tex_image_115, x, y); break;
-               case 116: r = kernel_tex_image_interp(__tex_image_116, x, y); break;
-               case 117: r = kernel_tex_image_interp(__tex_image_117, x, y); break;
-               case 118: r = kernel_tex_image_interp(__tex_image_118, x, y); break;
-               case 119: r = kernel_tex_image_interp(__tex_image_119, x, y); break;
-               case 120: r = kernel_tex_image_interp(__tex_image_120, x, y); break;
-               case 121: r = kernel_tex_image_interp(__tex_image_121, x, y); break;
-               case 122: r = kernel_tex_image_interp(__tex_image_122, x, y); break;
-               case 123: r = kernel_tex_image_interp(__tex_image_123, x, y); break;
-               case 124: r = kernel_tex_image_interp(__tex_image_124, x, y); break;
-               case 125: r = kernel_tex_image_interp(__tex_image_125, x, y); break;
-               case 126: r = kernel_tex_image_interp(__tex_image_126, x, y); break;
-               case 127: r = kernel_tex_image_interp(__tex_image_127, x, y); break;
-               case 128: r = kernel_tex_image_interp(__tex_image_128, x, y); break;
-               case 129: r = kernel_tex_image_interp(__tex_image_129, x, y); break;
-               case 130: r = kernel_tex_image_interp(__tex_image_130, x, y); break;
-               case 131: r = kernel_tex_image_interp(__tex_image_131, x, y); break;
-               case 132: r = kernel_tex_image_interp(__tex_image_132, x, y); break;
-               case 133: r = kernel_tex_image_interp(__tex_image_133, x, y); break;
-               case 134: r = kernel_tex_image_interp(__tex_image_134, x, y); break;
-               case 135: r = kernel_tex_image_interp(__tex_image_135, x, y); break;
-               case 136: r = kernel_tex_image_interp(__tex_image_136, x, y); break;
-               case 137: r = kernel_tex_image_interp(__tex_image_137, x, y); break;
-               case 138: r = kernel_tex_image_interp(__tex_image_138, x, y); break;
-               case 139: r = kernel_tex_image_interp(__tex_image_139, x, y); break;
-               case 140: r = kernel_tex_image_interp(__tex_image_140, x, y); break;
-               case 141: r = kernel_tex_image_interp(__tex_image_141, x, y); break;
-               case 142: r = kernel_tex_image_interp(__tex_image_142, x, y); break;
-               case 143: r = kernel_tex_image_interp(__tex_image_143, x, y); break;
-               case 144: r = kernel_tex_image_interp(__tex_image_144, x, y); break;
-               case 145: r = kernel_tex_image_interp(__tex_image_145, x, y); break;
-               case 146: r = kernel_tex_image_interp(__tex_image_146, x, y); break;
-               case 147: r = kernel_tex_image_interp(__tex_image_147, x, y); break;
-               case 148: r = kernel_tex_image_interp(__tex_image_148, x, y); break;
-               case 149: r = kernel_tex_image_interp(__tex_image_149, x, y); break;
-               case 150: r = kernel_tex_image_interp(__tex_image_150, x, y); break;
+               case 93: r = kernel_tex_image_interp(__tex_image_byte_093, x, y); break;
+               case 94: r = kernel_tex_image_interp(__tex_image_byte_094, x, y); break;
+               case 95: r = kernel_tex_image_interp(__tex_image_byte_095, x, y); break;
+               case 96: r = kernel_tex_image_interp(__tex_image_byte_096, x, y); break;
+               case 97: r = kernel_tex_image_interp(__tex_image_byte_097, x, y); break;
+               case 98: r = kernel_tex_image_interp(__tex_image_byte_098, x, y); break;
+               case 99: r = kernel_tex_image_interp(__tex_image_byte_099, x, y); break;
+               case 100: r = kernel_tex_image_interp(__tex_image_byte_100, x, y); break;
+               case 101: r = kernel_tex_image_interp(__tex_image_byte_101, x, y); break;
+               case 102: r = kernel_tex_image_interp(__tex_image_byte_102, x, y); break;
+               case 103: r = kernel_tex_image_interp(__tex_image_byte_103, x, y); break;
+               case 104: r = kernel_tex_image_interp(__tex_image_byte_104, x, y); break;
+               case 105: r = kernel_tex_image_interp(__tex_image_byte_105, x, y); break;
+               case 106: r = kernel_tex_image_interp(__tex_image_byte_106, x, y); break;
+               case 107: r = kernel_tex_image_interp(__tex_image_byte_107, x, y); break;
+               case 108: r = kernel_tex_image_interp(__tex_image_byte_108, x, y); break;
+               case 109: r = kernel_tex_image_interp(__tex_image_byte_109, x, y); break;
+               case 110: r = kernel_tex_image_interp(__tex_image_byte_110, x, y); break;
+               case 111: r = kernel_tex_image_interp(__tex_image_byte_111, x, y); break;
+               case 112: r = kernel_tex_image_interp(__tex_image_byte_112, x, y); break;
+               case 113: r = kernel_tex_image_interp(__tex_image_byte_113, x, y); break;
+               case 114: r = kernel_tex_image_interp(__tex_image_byte_114, x, y); break;
+               case 115: r = kernel_tex_image_interp(__tex_image_byte_115, x, y); break;
+               case 116: r = kernel_tex_image_interp(__tex_image_byte_116, x, y); break;
+               case 117: r = kernel_tex_image_interp(__tex_image_byte_117, x, y); break;
+               case 118: r = kernel_tex_image_interp(__tex_image_byte_118, x, y); break;
+               case 119: r = kernel_tex_image_interp(__tex_image_byte_119, x, y); break;
+               case 120: r = kernel_tex_image_interp(__tex_image_byte_120, x, y); break;
+               case 121: r = kernel_tex_image_interp(__tex_image_byte_121, x, y); break;
+               case 122: r = kernel_tex_image_interp(__tex_image_byte_122, x, y); break;
+               case 123: r = kernel_tex_image_interp(__tex_image_byte_123, x, y); break;
+               case 124: r = kernel_tex_image_interp(__tex_image_byte_124, x, y); break;
+               case 125: r = kernel_tex_image_interp(__tex_image_byte_125, x, y); break;
+               case 126: r = kernel_tex_image_interp(__tex_image_byte_126, x, y); break;
+               case 127: r = kernel_tex_image_interp(__tex_image_byte_127, x, y); break;
+               case 128: r = kernel_tex_image_interp(__tex_image_byte_128, x, y); break;
+               case 129: r = kernel_tex_image_interp(__tex_image_byte_129, x, y); break;
+               case 130: r = kernel_tex_image_interp(__tex_image_byte_130, x, y); break;
+               case 131: r = kernel_tex_image_interp(__tex_image_byte_131, x, y); break;
+               case 132: r = kernel_tex_image_interp(__tex_image_byte_132, x, y); break;
+               case 133: r = kernel_tex_image_interp(__tex_image_byte_133, x, y); break;
+               case 134: r = kernel_tex_image_interp(__tex_image_byte_134, x, y); break;
+               case 135: r = kernel_tex_image_interp(__tex_image_byte_135, x, y); break;
+               case 136: r = kernel_tex_image_interp(__tex_image_byte_136, x, y); break;
+               case 137: r = kernel_tex_image_interp(__tex_image_byte_137, x, y); break;
+               case 138: r = kernel_tex_image_interp(__tex_image_byte_138, x, y); break;
+               case 139: r = kernel_tex_image_interp(__tex_image_byte_139, x, y); break;
+               case 140: r = kernel_tex_image_interp(__tex_image_byte_140, x, y); break;
+               case 141: r = kernel_tex_image_interp(__tex_image_byte_141, x, y); break;
+               case 142: r = kernel_tex_image_interp(__tex_image_byte_142, x, y); break;
+               case 143: r = kernel_tex_image_interp(__tex_image_byte_143, x, y); break;
+               case 144: r = kernel_tex_image_interp(__tex_image_byte_144, x, y); break;
+               case 145: r = kernel_tex_image_interp(__tex_image_byte_145, x, y); break;
+               case 146: r = kernel_tex_image_interp(__tex_image_byte_146, x, y); break;
+               case 147: r = kernel_tex_image_interp(__tex_image_byte_147, x, y); break;
+               case 148: r = kernel_tex_image_interp(__tex_image_byte_148, x, y); break;
+               case 149: r = kernel_tex_image_interp(__tex_image_byte_149, x, y); break;
+               case 150: r = kernel_tex_image_interp(__tex_image_byte_150, x, y); break;
 #  endif
 
                default:
 #  endif
 
                default:
@@ -322,7 +322,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
 
        if(use_alpha && alpha != 1.0f && alpha != 0.0f) {
                r_ssef = r_ssef / ssef(alpha);
 
        if(use_alpha && alpha != 1.0f && alpha != 0.0f) {
                r_ssef = r_ssef / ssef(alpha);
-               if(id >= TEX_NUM_FLOAT_IMAGES)
+               if(id >= TEX_NUM_FLOAT4_IMAGES)
                        r_ssef = min(r_ssef, ssef(1.0f));
                r.w = alpha;
        }
                        r_ssef = min(r_ssef, ssef(1.0f));
                r.w = alpha;
        }
@@ -338,7 +338,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
                r.y *= invw;
                r.z *= invw;
 
                r.y *= invw;
                r.z *= invw;
 
-               if(id >= TEX_NUM_FLOAT_IMAGES) {
+               if(id >= TEX_NUM_FLOAT4_IMAGES) {
                        r.x = min(r.x, 1.0f);
                        r.y = min(r.y, 1.0f);
                        r.z = min(r.z, 1.0f);
                        r.x = min(r.x, 1.0f);
                        r.y = min(r.y, 1.0f);
                        r.z = min(r.z, 1.0f);
index c7636516370f1907cdb3039baa5c9a69d27d5e75..76a363b6bb7d0b4f2ab6856e06a9b6da4dfae666 100644 (file)
@@ -42,31 +42,31 @@ ImageManager::ImageManager(const DeviceInfo& info)
        /* CPU */
        if(info.type == DEVICE_CPU) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_CPU;
        /* CPU */
        if(info.type == DEVICE_CPU) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_CPU;
-               tex_num_images[IMAGE_DATA_TYPE_FLOAT] = TEX_NUM_FLOAT_IMAGES_CPU;
+               tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_CPU;
                tex_image_byte_start = TEX_IMAGE_BYTE_START_CPU;
        }
        /* CUDA (Fermi) */
        else if((info.type == DEVICE_CUDA || info.type == DEVICE_MULTI) && !info.extended_images) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_CUDA;
                tex_image_byte_start = TEX_IMAGE_BYTE_START_CPU;
        }
        /* CUDA (Fermi) */
        else if((info.type == DEVICE_CUDA || info.type == DEVICE_MULTI) && !info.extended_images) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_CUDA;
-               tex_num_images[IMAGE_DATA_TYPE_FLOAT] = TEX_NUM_FLOAT_IMAGES_CUDA;
+               tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_CUDA;
                tex_image_byte_start = TEX_IMAGE_BYTE_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_BYTE] = TEX_NUM_BYTE_IMAGES_CUDA_KEPLER;
                tex_image_byte_start = TEX_IMAGE_BYTE_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_BYTE] = TEX_NUM_BYTE_IMAGES_CUDA_KEPLER;
-               tex_num_images[IMAGE_DATA_TYPE_FLOAT] = TEX_NUM_FLOAT_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;
        }
        /* OpenCL */
        else if(info.pack_images) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_OPENCL;
                tex_image_byte_start = TEX_IMAGE_BYTE_START_CUDA_KELPER;
        }
        /* OpenCL */
        else if(info.pack_images) {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = TEX_NUM_BYTE_IMAGES_OPENCL;
-               tex_num_images[IMAGE_DATA_TYPE_FLOAT] = TEX_NUM_FLOAT_IMAGES_OPENCL;
+               tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = TEX_NUM_FLOAT4_IMAGES_OPENCL;
                tex_image_byte_start = TEX_IMAGE_BYTE_START_OPENCL;
        }
        /* Should never happen */
        else {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = 0;
                tex_image_byte_start = TEX_IMAGE_BYTE_START_OPENCL;
        }
        /* Should never happen */
        else {
                tex_num_images[IMAGE_DATA_TYPE_BYTE] = 0;
-               tex_num_images[IMAGE_DATA_TYPE_FLOAT] = 0;
+               tex_num_images[IMAGE_DATA_TYPE_FLOAT4] = 0;
                tex_image_byte_start = 0;
                assert(0);
        }
                tex_image_byte_start = 0;
                assert(0);
        }
@@ -184,14 +184,14 @@ int ImageManager::flattened_slot_to_type_index(int slot, ImageDataType *type)
                return slot -= tex_image_byte_start;
        }
        else {
                return slot -= tex_image_byte_start;
        }
        else {
-               *type = IMAGE_DATA_TYPE_FLOAT;
+               *type = IMAGE_DATA_TYPE_FLOAT4;
                return slot;
        }
 }
 
 string ImageManager::name_from_type(int type)
 {
                return slot;
        }
 }
 
 string ImageManager::name_from_type(int type)
 {
-       if(type == IMAGE_DATA_TYPE_FLOAT)
+       if(type == IMAGE_DATA_TYPE_FLOAT4)
                return "float";
        else
                return "byte";
                return "float";
        else
                return "byte";
@@ -225,7 +225,7 @@ int ImageManager::add_image(const string& filename,
        /* Load image info and find out if we need a float texture. */
        is_float = (pack_images)? false: is_float_image(filename, builtin_data, is_linear);
 
        /* Load image info and find out if we need a float texture. */
        is_float = (pack_images)? false: is_float_image(filename, builtin_data, is_linear);
 
-       ImageDataType type = is_float? IMAGE_DATA_TYPE_FLOAT : IMAGE_DATA_TYPE_BYTE;
+       ImageDataType type = is_float? IMAGE_DATA_TYPE_FLOAT4 : IMAGE_DATA_TYPE_BYTE;
 
        /* Fnd existing image. */
        for(slot = 0; slot < images[type].size(); slot++) {
 
        /* Fnd existing image. */
        for(slot = 0; slot < images[type].size(); slot++) {
@@ -641,8 +641,8 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
        string filename = path_filename(images[type][slot_offset]->filename);
        progress->set_status("Updating Images", "Loading " + filename);
 
        string filename = path_filename(images[type][slot_offset]->filename);
        progress->set_status("Updating Images", "Loading " + filename);
 
-       if(type == IMAGE_DATA_TYPE_FLOAT) {
-               device_vector<float4>& tex_img = dscene->tex_float_image[slot_offset];
+       if(type == IMAGE_DATA_TYPE_FLOAT4) {
+               device_vector<float4>& tex_img = dscene->tex_float4_image[slot_offset];
 
                if(tex_img.device_pointer) {
                        thread_scoped_lock device_lock(device_mutex);
 
                if(tex_img.device_pointer) {
                        thread_scoped_lock device_lock(device_mutex);
@@ -661,9 +661,9 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
 
                string name;
 
 
                string name;
 
-               if(slot >= 100) name = string_printf("__tex_image_float_%d", slot);
-               else if(slot >= 10) name = string_printf("__tex_image_float_0%d", slot);
-               else name = string_printf("__tex_image_float_00%d", slot);
+               if(slot >= 100) name = string_printf("__tex_image_float4_%d", slot);
+               else if(slot >= 10) name = string_printf("__tex_image_float4_0%d", slot);
+               else name = string_printf("__tex_image_float4_00%d", slot);
 
                if(!pack_images) {
                        thread_scoped_lock device_lock(device_mutex);
 
                if(!pack_images) {
                        thread_scoped_lock device_lock(device_mutex);
@@ -674,7 +674,7 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
                }
        }
        else {
                }
        }
        else {
-               device_vector<uchar4>& tex_img = dscene->tex_image[slot_offset];
+               device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot_offset];
 
                if(tex_img.device_pointer) {
                        thread_scoped_lock device_lock(device_mutex);
 
                if(tex_img.device_pointer) {
                        thread_scoped_lock device_lock(device_mutex);
@@ -693,9 +693,9 @@ void ImageManager::device_load_image(Device *device, DeviceScene *dscene, int sl
 
                string name;
 
 
                string name;
 
-               if(slot >= 100) name = string_printf("__tex_image_%d", slot);
-               else if(slot >= 10) name = string_printf("__tex_image_0%d", slot);
-               else name = string_printf("__tex_image_00%d", slot);
+               if(slot >= 100) name = string_printf("__tex_image_byte_%d", slot);
+               else if(slot >= 10) name = string_printf("__tex_image_byte_0%d", slot);
+               else name = string_printf("__tex_image_byte_00%d", slot);
 
                if(!pack_images) {
                        thread_scoped_lock device_lock(device_mutex);
 
                if(!pack_images) {
                        thread_scoped_lock device_lock(device_mutex);
@@ -725,8 +725,8 @@ void ImageManager::device_free_image(Device *device, DeviceScene *dscene, int sl
                        ((OSL::TextureSystem*)osl_texture_system)->invalidate(filename);
 #endif
                }
                        ((OSL::TextureSystem*)osl_texture_system)->invalidate(filename);
 #endif
                }
-               else if(type == IMAGE_DATA_TYPE_FLOAT) {
-                       device_vector<float4>& tex_img = dscene->tex_float_image[slot_offset];
+               else if(type == IMAGE_DATA_TYPE_FLOAT4) {
+                       device_vector<float4>& tex_img = dscene->tex_float4_image[slot_offset];
 
                        if(tex_img.device_pointer) {
                                thread_scoped_lock device_lock(device_mutex);
 
                        if(tex_img.device_pointer) {
                                thread_scoped_lock device_lock(device_mutex);
@@ -739,7 +739,7 @@ void ImageManager::device_free_image(Device *device, DeviceScene *dscene, int sl
                        images[type][slot_offset] = NULL;
                }
                else {
                        images[type][slot_offset] = NULL;
                }
                else {
-                       device_vector<uchar4>& tex_img = dscene->tex_image[slot_offset];
+                       device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot_offset];
 
                        if(tex_img.device_pointer) {
                                thread_scoped_lock device_lock(device_mutex);
 
                        if(tex_img.device_pointer) {
                                thread_scoped_lock device_lock(device_mutex);
@@ -824,7 +824,7 @@ void ImageManager::device_pack_images(Device *device,
                if(!images[type][slot])
                        continue;
 
                if(!images[type][slot])
                        continue;
 
-               device_vector<uchar4>& tex_img = dscene->tex_image[slot];
+               device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
                size += tex_img.size();
        }
 
                size += tex_img.size();
        }
 
@@ -837,7 +837,7 @@ void ImageManager::device_pack_images(Device *device,
                if(!images[type][slot])
                        continue;
 
                if(!images[type][slot])
                        continue;
 
-               device_vector<uchar4>& tex_img = dscene->tex_image[slot];
+               device_vector<uchar4>& tex_img = dscene->tex_byte_image[slot];
 
                /* todo: support 3D textures, only CPU for now */
 
 
                /* todo: support 3D textures, only CPU for now */
 
index b28f4536db21559a6414f1e84df98fd1df129ba6..b4097d624b8c34db8a7d15826f9a58c8f95ac87e 100644 (file)
@@ -36,7 +36,7 @@ public:
        ~ImageManager();
 
        enum ImageDataType {
        ~ImageManager();
 
        enum ImageDataType {
-               IMAGE_DATA_TYPE_FLOAT = 0,
+               IMAGE_DATA_TYPE_FLOAT4 = 0,
                IMAGE_DATA_TYPE_BYTE = 1,
 
                IMAGE_DATA_NUM_TYPES
                IMAGE_DATA_TYPE_BYTE = 1,
 
                IMAGE_DATA_NUM_TYPES
index b29aff88c01c3803a2376198a50039f8b5fcbcba..4f139e4d73fd9105ae422d7f0e89bd816befdec7 100644 (file)
@@ -109,8 +109,8 @@ public:
        device_vector<uint> sobol_directions;
 
        /* cpu images */
        device_vector<uint> sobol_directions;
 
        /* cpu images */
-       device_vector<uchar4> tex_image[TEX_NUM_BYTE_IMAGES_CPU];
-       device_vector<float4> tex_float_image[TEX_NUM_FLOAT_IMAGES_CPU];
+       device_vector<uchar4> tex_byte_image[TEX_NUM_BYTE_IMAGES_CPU];
+       device_vector<float4> tex_float4_image[TEX_NUM_FLOAT4_IMAGES_CPU];
 
        /* opencl images */
        device_vector<uchar4> tex_image_packed;
 
        /* opencl images */
        device_vector<uchar4> tex_image_packed;
index 2b6b8e743fb4de6f5b2b8544cd4268def9249acd..2894a1a0b41865223cd10d727b42827570c487f0 100644 (file)
@@ -23,23 +23,23 @@ CCL_NAMESPACE_BEGIN
 
 /* CPU */
 #define TEX_NUM_BYTE_IMAGES_CPU                1024
 
 /* CPU */
 #define TEX_NUM_BYTE_IMAGES_CPU                1024
-#define TEX_NUM_FLOAT_IMAGES_CPU       1024
-#define TEX_IMAGE_BYTE_START_CPU       TEX_NUM_FLOAT_IMAGES_CPU
+#define TEX_NUM_FLOAT4_IMAGES_CPU      1024
+#define TEX_IMAGE_BYTE_START_CPU       TEX_NUM_FLOAT4_IMAGES_CPU
 
 /* CUDA (Fermi) */
 #define TEX_NUM_BYTE_IMAGES_CUDA       88
 
 /* CUDA (Fermi) */
 #define TEX_NUM_BYTE_IMAGES_CUDA       88
-#define TEX_NUM_FLOAT_IMAGES_CUDA      5
-#define TEX_IMAGE_BYTE_START_CUDA      TEX_NUM_FLOAT_IMAGES_CUDA
+#define TEX_NUM_FLOAT4_IMAGES_CUDA     5
+#define TEX_IMAGE_BYTE_START_CUDA      TEX_NUM_FLOAT4_IMAGES_CUDA
 
 /* CUDA (KEPLER and above) */
 #define TEX_NUM_BYTE_IMAGES_CUDA_KEPLER                145
 
 /* CUDA (KEPLER and above) */
 #define TEX_NUM_BYTE_IMAGES_CUDA_KEPLER                145
-#define TEX_NUM_FLOAT_IMAGES_CUDA_KEPLER       5
-#define TEX_IMAGE_BYTE_START_CUDA_KELPER       TEX_NUM_FLOAT_IMAGES_CUDA_KEPLER
+#define TEX_NUM_FLOAT4_IMAGES_CUDA_KEPLER      5
+#define TEX_IMAGE_BYTE_START_CUDA_KELPER       TEX_NUM_FLOAT4_IMAGES_CUDA_KEPLER
 
 /* OpenCL */
 #define TEX_NUM_BYTE_IMAGES_OPENCL             1024
 
 /* OpenCL */
 #define TEX_NUM_BYTE_IMAGES_OPENCL             1024
-#define TEX_NUM_FLOAT_IMAGES_OPENCL            0
-#define TEX_IMAGE_BYTE_START_OPENCL            TEX_NUM_FLOAT_IMAGES_OPENCL
+#define TEX_NUM_FLOAT4_IMAGES_OPENCL           0
+#define TEX_IMAGE_BYTE_START_OPENCL            TEX_NUM_FLOAT4_IMAGES_OPENCL
 
 
 /* Color to use when textures are not found. */
 
 
 /* Color to use when textures are not found. */