Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-03 22:21:19 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-03 22:32:29 +0300
commit6ec599c68214413475cbea403ef869ed7c8113f9 (patch)
tree5052e130555b6850e17ad0b0944d22b7331871f6 /intern/cycles/device/device_cuda.cpp
parent6664ee209e96fe4a4ae8018bcf10f798a3b53751 (diff)
Fix T53247: mixed CPU + GPU render wrong texture limits.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index aa6386e455b..c951364b53a 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -274,7 +274,7 @@ public:
delete split_kernel;
- if(info.has_bindless_textures) {
+ if(!info.has_fermi_limits) {
texture_info.free();
}
@@ -547,7 +547,7 @@ public:
void load_texture_info()
{
- if(info.has_bindless_textures && need_texture_info) {
+ if(!info.has_fermi_limits && need_texture_info) {
texture_info.copy_to_device();
need_texture_info = false;
}
@@ -701,7 +701,7 @@ public:
<< string_human_readable_size(mem.memory_size()) << ")";
/* Check if we are on sm_30 or above, for bindless textures. */
- bool has_bindless_textures = info.has_bindless_textures;
+ bool has_fermi_limits = info.has_fermi_limits;
/* General variables for both architectures */
string bind_name = mem.name;
@@ -735,7 +735,7 @@ public:
/* General variables for Fermi */
CUtexref texref = NULL;
- if(!has_bindless_textures && mem.interpolation != INTERPOLATION_NONE) {
+ if(has_fermi_limits && mem.interpolation != INTERPOLATION_NONE) {
if(mem.data_depth > 1) {
/* Kernel uses different bind names for 2d and 3d float textures,
* so we have to adjust couple of things here.
@@ -853,7 +853,7 @@ public:
stats.mem_alloc(size);
- if(has_bindless_textures) {
+ if(!has_fermi_limits) {
/* Bindless Textures - Kepler */
int flat_slot = 0;
if(string_startswith(mem.name, "__tex_image")) {
@@ -934,7 +934,7 @@ public:
cuArrayDestroy((CUarray)mem.device_pointer);
/* Free CUtexObject (Bindless Textures) */
- if(info.has_bindless_textures && tex_bindless_map[mem.device_pointer]) {
+ if(!info.has_fermi_limits && tex_bindless_map[mem.device_pointer]) {
CUtexObject tex = tex_bindless_map[mem.device_pointer];
cuTexObjectDestroy(tex);
}
@@ -2174,7 +2174,8 @@ void device_cuda_info(vector<DeviceInfo>& devices)
info.num = num;
info.advanced_shading = (major >= 2);
- info.has_bindless_textures = (major >= 3);
+ info.has_fermi_limits = (major < 3);
+ info.has_half_images = true;
info.has_volume_decoupled = false;
info.has_qbvh = false;