[Bf-blender-cvs] [bdfc10e482c] master: Fix T59349: Cycles viewport render flickering when changing some settings.
Brecht Van Lommel
noreply at git.blender.org
Thu Jan 3 19:22:00 CET 2019
Commit: bdfc10e482c4c6724a45259c4b2f2d7cde7d26d0
Author: Brecht Van Lommel
Date: Thu Jan 3 19:21:10 2019 +0100
Branches: master
https://developer.blender.org/rBbdfc10e482c4c6724a45259c4b2f2d7cde7d26d0
Fix T59349: Cycles viewport render flickering when changing some settings.
===================================================================
M intern/cycles/device/device.cpp
M intern/cycles/device/device_cuda.cpp
===================================================================
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index be35b90bff0..6ff94b45700 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -242,6 +242,7 @@ void Device::draw_pixels(
mem_copy_from(rgba, y, w, h, rgba.memory_elements_size(1));
GLuint texid;
+ glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &texid);
glBindTexture(GL_TEXTURE_2D, texid);
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index a788a8627d8..67f5793e793 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1861,6 +1861,7 @@ public:
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+ glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &pmem.cuTexId);
glBindTexture(GL_TEXTURE_2D, pmem.cuTexId);
if(mem.data_type == TYPE_HALF)
@@ -1949,6 +1950,7 @@ public:
offset *= sizeof(uint8_t);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pmem.cuPBO);
+ glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, pmem.cuTexId);
if(mem.data_type == TYPE_HALF) {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_HALF_FLOAT, (void*)offset);
More information about the Bf-blender-cvs
mailing list