[Bf-blender-cvs] [8128f8d] soc-2016-cycles_images: Add half data type to CUDA device.

Thomas Dinges noreply at git.blender.org
Thu Jun 9 18:54:27 CEST 2016


Commit: 8128f8de30aced3d7bf31d5d52c077f328bea30a
Author: Thomas Dinges
Date:   Thu Jun 9 18:53:00 2016 +0200
Branches: soc-2016-cycles_images
https://developer.blender.org/rB8128f8de30aced3d7bf31d5d52c077f328bea30a

Add half data type to CUDA device.

Have to clearly check on this though before adding support for actual half textures on GPU, as CUDA (since Toolkit 7.5) only supports a half and half2 data type, no half4.

===================================================================

M	intern/cycles/device/device_cuda.cpp

===================================================================

diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index d7ed7b4..1752585 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -536,6 +536,7 @@ public:
 			case TYPE_UINT: format = CU_AD_FORMAT_UNSIGNED_INT32; break;
 			case TYPE_INT: format = CU_AD_FORMAT_SIGNED_INT32; break;
 			case TYPE_FLOAT: format = CU_AD_FORMAT_FLOAT; break;
+			case TYPE_HALF: format = CU_AD_FORMAT_HALF; break;
 			default: assert(0); return;
 		}




More information about the Bf-blender-cvs mailing list