Fix Cycles OpenCL textures after recent CUDA fix.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 15 Aug 2016 14:17:47 +0000 (16:17 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 15 Aug 2016 14:28:48 +0000 (16:28 +0200)
kernel_textures.h is included in device_opencl.cpp, so we can't check
__KERNEL_OPENCL__ there.

intern/cycles/kernel/kernel_compat_cuda.h
intern/cycles/kernel/kernel_textures.h

index d656fac81e6624d70d5e05464feb7a9f17594259..9a96cb9f4387284201b4bba30cc93acd514c117c 100644 (file)
@@ -67,6 +67,7 @@ typedef texture<float, 1> texture_float;
 typedef texture<uint, 1> texture_uint;
 typedef texture<int, 1> texture_int;
 typedef texture<uint4, 1> texture_uint4;
+typedef texture<uchar, 1> texture_uchar;
 typedef texture<uchar4, 1> texture_uchar4;
 typedef texture<float4, 2> texture_image_float4;
 typedef texture<float4, 3> texture_image3d_float4;
index f45da39bad5f692a59423a02cb33035a05528a34..8d5bb75a428fdb4a542d6818a1ea4ac9e790ad84 100644 (file)
@@ -186,13 +186,11 @@ KERNEL_TEX(uint, texture_uint, __bindless_mapping)
 #endif
 
 /* packed image (opencl) */
-#ifdef __KERNEL_OPENCL__
 KERNEL_TEX(uchar4, texture_uchar4, __tex_image_byte4_packed)
 KERNEL_TEX(float4, texture_float4, __tex_image_float4_packed)
 KERNEL_TEX(uchar, texture_uchar, __tex_image_byte_packed)
 KERNEL_TEX(float, texture_float, __tex_image_float_packed)
 KERNEL_TEX(uint4, texture_uint4, __tex_image_packed_info)
-#endif
 
 #undef KERNEL_TEX
 #undef KERNEL_IMAGE_TEX