Commit: 55eda01950e854cf0952195a6d2b9cb79e6222b5
Author: Thomas Dinges
Date:   Thu May 19 04:09:00 2016 +0200
Branches: soc-2016-cycles_images
https://developer.blender.org/rB55eda01950e854cf0952195a6d2b9cb79e6222b5

Adress review comments.

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

M       intern/cycles/device/device_cuda.cpp

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

diff --git a/intern/cycles/device/device_cuda.cpp 
b/intern/cycles/device/device_cuda.cpp
index ef9b7cc..145ab97 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -405,6 +405,7 @@ public:
        void load_bindless_mapping()
        {
                if(info.has_bindless_textures && sync_bindless_mapping) {
+                       tex_free(bindless_mapping, -1);
                        tex_alloc("__bindless_mapping", bindless_mapping, 
INTERPOLATION_NONE, EXTENSION_REPEAT, 0);
                        sync_bindless_mapping = false;
                }
@@ -549,20 +550,16 @@ public:
 
                        cuda_push_context();
                        cuda_assert(cuModuleGetTexRef(&texref, cuModule, 
bind_name.c_str()));
+                       cuda_pop_context();
 
                        if(!texref) {
-                               cuda_pop_context();
                                return;
                        }
-
-                       cuda_pop_context();
                }
 
                /* Data Storage */
                if(interpolation == INTERPOLATION_NONE) {
                        if(has_bindless_textures) {
-                               cuda_pop_context();
-
                                mem_alloc(mem, MEM_READ_ONLY);
                                mem_copy_to(mem);
 
@@ -587,8 +584,6 @@ public:
                                cuda_pop_context();
                        }
                        else {
-                               cuda_pop_context();
-
                                mem_alloc(mem, MEM_READ_ONLY);
                                mem_copy_to(mem);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to