Code cleanup: remove some more unused code after recent CUDA changes.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 17 Feb 2018 23:51:46 +0000 (00:51 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 17 Feb 2018 23:53:03 +0000 (00:53 +0100)
intern/cycles/device/device_cuda.cpp
intern/cycles/kernel/geom/geom_curve_intersect.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.h
intern/cycles/render/image.cpp

index 42e78e5054053d6ea2ddf777b2ed72bc9d8f94a0..d28080c667a9ec562e4738345e075c1a7fa729ae 100644 (file)
@@ -1069,8 +1069,6 @@ public:
                }
 
                /* Image Texture Storage */
-               CUtexref texref = NULL;
-
                CUarray_format_enum format;
                switch(mem.data_type) {
                        case TYPE_UCHAR: format = CU_AD_FORMAT_UNSIGNED_INT8; break;
index 7f24aea5d28f69c03690959cd7d0003e9e89ebf8..faf3e3cdf2b50d23f33e33a4b322a726b300b64c 100644 (file)
@@ -500,17 +500,17 @@ ccl_device_forceinline bool cardinal_curve_intersect(
 }
 
 ccl_device_forceinline bool curve_intersect(KernelGlobals *kg,
-                                               Intersection *isect,
-                                               float3 P,
-                                               float3 direction,
-                                               uint visibility,
-                                               int object,
-                                               int curveAddr,
-                                               float time,
-                                               int type,
-                                               uint *lcg_state,
-                                               float difl,
-                                               float extmax)
+                                            Intersection *isect,
+                                            float3 P,
+                                            float3 direction,
+                                            uint visibility,
+                                            int object,
+                                            int curveAddr,
+                                            float time,
+                                            int type,
+                                            uint *lcg_state,
+                                            float difl,
+                                            float extmax)
 {
        /* define few macros to minimize code duplication for SSE */
 #ifndef __KERNEL_SSE2__
index 97d4726407b3ffd7a298b8db9dc24e677263b5e1..74cfacb5bc1d6fbc37d2ecac1449a3c7757dbdf9 100644 (file)
@@ -47,7 +47,6 @@ struct VolumeStep;
 
 typedef struct KernelGlobals {
 #  define KERNEL_TEX(type, name) texture<type> name;
-#  define KERNEL_IMAGE_TEX(type, ttype, name)
 #  include "kernel/kernel_textures.h"
 
        KernelData __data;
@@ -93,7 +92,6 @@ typedef struct KernelGlobals {
 } KernelGlobals;
 
 #  define KERNEL_TEX(type, name) const __constant__ __device__ type *name;
-#  define KERNEL_IMAGE_TEX(type, ttype, name) ttype name;
 #  include "kernel/kernel_textures.h"
 
 #endif  /* __KERNEL_CUDA__ */
index 7735a7bb355552dc7219810d127532c8a1c65fef..74b659557e5c29c2bc1ec742206b87e67e234c34 100644 (file)
 #  define KERNEL_TEX(type, name)
 #endif
 
-#ifndef KERNEL_IMAGE_TEX
-#  define KERNEL_IMAGE_TEX(type, ttype, name)
-#endif
-
 /* bvh */
 KERNEL_TEX(float4, __bvh_nodes)
 KERNEL_TEX(float4, __bvh_leaf_nodes)
@@ -82,6 +78,4 @@ KERNEL_TEX(uint, __sobol_directions)
 KERNEL_TEX(TextureInfo, __texture_info)
 
 #undef KERNEL_TEX
-#undef KERNEL_IMAGE_TEX
-
 
index aa67262f36b8cf512db629a7a538a85a7407a610..de487f6123f0714f96b5eb5bee49b34497e47e67 100644 (file)
@@ -85,7 +85,6 @@ void kernel_tex_copy(KernelGlobals *kg,
                kg->tname.data = (type*)mem; \
                kg->tname.width = size; \
        }
-#define KERNEL_IMAGE_TEX(type, tname)
 #include "kernel/kernel_textures.h"
        else {
                assert(0);
index a8f99d23b7db6dbdd6e43a7b5c6785b4f26df703..fae9f78348380445163d60d14d86954f396643cb 100644 (file)
@@ -30,8 +30,7 @@
  * in local memory on the GPU, as it would take too many register and indexes in
  * ways not known at compile time. This seems the only solution even though it
  * may be slow, with two positive factors. If the same shader is being executed,
- * memory access will be coalesced, and on fermi cards, memory will actually be
- * cached.
+ * memory access will be coalesced and cached.
  *
  * The result of shader execution will be a single closure. This means the
  * closure type, associated label, data and weight. Sampling from multiple
index 29f37afd6762e562ab099ef8f46d6669f2e8bc24..dbe15a67b9e19ed5904e460b750a4d3e81dabbfa 100644 (file)
@@ -254,7 +254,7 @@ int ImageManager::add_image(const string& filename,
        /* Check whether it's a float texture. */
        is_float = (type == IMAGE_DATA_TYPE_FLOAT || type == IMAGE_DATA_TYPE_FLOAT4);
 
-       /* No half textures on OpenCL, use available slots */
+       /* No half textures on OpenCL, use full float instead. */
        if(!has_half_images) {
                if(type == IMAGE_DATA_TYPE_HALF4) {
                        type = IMAGE_DATA_TYPE_FLOAT4;