diff options
author | Stefan Werner <stewreo@gmail.com> | 2017-07-20 11:03:27 +0300 |
---|---|---|
committer | Stefan Werner <stewreo@gmail.com> | 2017-07-20 11:03:27 +0300 |
commit | 4bc6faf9c838084b23740c8749759f0c0b956c2b (patch) | |
tree | e20a9954e31fd50470a367850d80cdd58e9407aa /intern/cycles/render/image.cpp | |
parent | 6e90294e08be01788112c883ed3dc8fc01eaaee8 (diff) |
Fix T52107: Color management difference when using multiple and different GPUs together
This commit unifies the flattened texture slot names for bindless and regular CUDA textures. Texture indices are now identical across all CUDA architectures, where before Fermi used different indices, which lead to problems when rendering on multi-GPU setups mixing Fermi with newer hardware.
Diffstat (limited to 'intern/cycles/render/image.cpp')
-rw-r--r-- | intern/cycles/render/image.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index f4482e0bb25..dc493614210 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -218,37 +218,14 @@ int ImageManager::max_flattened_slot(ImageDataType type) /* The lower three bits of a device texture slot number indicate its type. * These functions convert the slot ids from ImageManager "images" ones * to device ones and vice verse. - * - * There are special cases for CUDA Fermi, since there we have only 90 image texture - * slots available and should keep the flattended numbers in the 0-89 range. */ int ImageManager::type_index_to_flattened_slot(int slot, ImageDataType type) { - if(cuda_fermi_limits) { - if(type == IMAGE_DATA_TYPE_BYTE4) { - return slot + TEX_START_BYTE4_CUDA; - } - else { - return slot; - } - } - return (slot << IMAGE_DATA_TYPE_SHIFT) | (type); } int ImageManager::flattened_slot_to_type_index(int flat_slot, ImageDataType *type) { - if(cuda_fermi_limits) { - if(flat_slot >= 4) { - *type = IMAGE_DATA_TYPE_BYTE4; - return flat_slot - TEX_START_BYTE4_CUDA; - } - else { - *type = IMAGE_DATA_TYPE_FLOAT4; - return flat_slot; - } - } - *type = (ImageDataType)(flat_slot & IMAGE_DATA_TYPE_MASK); return flat_slot >> IMAGE_DATA_TYPE_SHIFT; } |