Commit: 34fd04f3b94ae53a40e7d8a3037af7c3b09a3849
Author: Clément Foucault
Date:   Thu Jan 23 01:57:37 2020 +0100
Branches: draw-colormanagement
https://developer.blender.org/rB34fd04f3b94ae53a40e7d8a3037af7c3b09a3849

OCIO: Fix curve cache preventing curvemapping update

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

M       intern/opencolorio/ocio_impl_glsl.cc

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

diff --git a/intern/opencolorio/ocio_impl_glsl.cc 
b/intern/opencolorio/ocio_impl_glsl.cc
index d37c7632eaf..3d4c4a00a5d 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -598,7 +598,9 @@ bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r,
 
   OCIO_GLSLCacheHandle *shader_handle = cacheSearch(state->shader_cache, 
shader_cache_id);
   OCIO_GLSLCacheHandle *lut3d_handle = cacheSearch(state->lut3d_cache, 
lut3d_cache_id);
-  OCIO_GLSLCacheHandle *curvemap_handle = cacheSearch(state->curvemap_cache, 
curvemap_cache_id);
+  /* We cannot keep more than one cache for curvemap because their cache id is 
a pointer.
+   * The pointer cannot be the same for one update but can be the same after a 
second update. */
+  OCIO_GLSLCacheHandle *curvemap_handle = &state->curvemap_cache[0];
 
   OCIO_GLSLShader **shader_ptr = (OCIO_GLSLShader **)&shader_handle->data;
   OCIO_GLSLLut3d **lut3d_ptr = (OCIO_GLSLLut3d **)&lut3d_handle->data;

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

Reply via email to