Fix T52660: CUDA volume texture rendering not working on Fermi GPUs.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 6 Sep 2017 16:12:45 +0000 (18:12 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 6 Sep 2017 16:12:45 +0000 (18:12 +0200)
intern/cycles/kernel/geom/geom_volume.h
intern/cycles/kernel/kernel_textures.h

index 1e0ef5201c92f724fbccb4353af36a8e955c0882..698cd6b03fddf21c429f39376c4c578307ea7a99 100644 (file)
@@ -35,10 +35,10 @@ ccl_device float4 volume_image_texture_3d(int id, float x, float y, float z)
        float4 r;
        switch(id) {
                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;
+               case 8: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_008, x, y, z); break;
+               case 16: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_016, x, y, z); break;
+               case 24: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_024, x, y, z); break;
+               case 32: r = kernel_tex_image_interp_3d(__tex_image_float4_3d_032, x, y, z); break;
        }
        return r;
 }
index dc6bbbb9924cf5e587654b6cfe295b69f15db39a..5eab28a295338f99a1547ab0fb7c37f929e57831 100644 (file)
@@ -88,10 +88,10 @@ KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_024)
 KERNEL_IMAGE_TEX(float4, texture_image_float4, __tex_image_float4_032)
 
 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)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_008)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_016)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_024)
+KERNEL_IMAGE_TEX(float4, texture_image3d_float4, __tex_image_float4_3d_032)
 
 /* image
  * These texture names are encoded to their flattened slots as