diff options
author | Thomas Dinges <blender@dingto.org> | 2014-05-11 05:38:39 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-05-11 05:38:39 +0400 |
commit | c08c931fb6f57bdca7865d48ac09a0775590f3ce (patch) | |
tree | 8d5bbe8b0e23288d6227545811b3822eebf01fba /intern/cycles/device | |
parent | 8904eaf5047780eaf97eb7dc3acebb1b65f258bd (diff) |
Cycles / CUDA: Increase maximum image textures on GPU.
Instead of 95, we can use 145 images now. This only affects Kepler and above (sm30, sm_35 and sm_50).
This can be increased further if needed, but let's first test if this does not come with a performance impact.
Originally developed during my GSoC 2013.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/device.h | 2 | ||||
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/device/device_multi.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index cbabcb1e20e..bcddd4f73e2 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -54,6 +54,7 @@ public: bool display_device; bool advanced_shading; bool pack_images; + bool extended_images; /* flag for GPU and Multi device */ vector<DeviceInfo> multi_devices; DeviceInfo() @@ -64,6 +65,7 @@ public: display_device = false; advanced_shading = true; pack_images = false; + extended_images = false; } }; diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 9139a75ef3e..68955211146 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -1150,6 +1150,7 @@ void device_cuda_info(vector<DeviceInfo>& devices) int major, minor; cuDeviceComputeCapability(&major, &minor, num); info.advanced_shading = (major >= 2); + info.extended_images = (major >= 3); info.pack_images = false; /* if device has a kernel timeout, assume it is used for display */ diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index 59bbf3b9d5a..c866ebaaea2 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -328,6 +328,7 @@ static bool device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool info.advanced_shading = with_advanced_shading; info.pack_images = false; + info.extended_images = true; foreach(DeviceInfo& subinfo, devices) { if(subinfo.type == type) { @@ -351,6 +352,7 @@ static bool device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool if(subinfo.display_device) info.display_device = true; info.pack_images = info.pack_images || subinfo.pack_images; + info.extended_images = info.extended_images && subinfo.extended_images; num_added++; } } |