From 2a5379bb8ca72a1080d260b66a4ea8d240e09f48 Mon Sep 17 00:00:00 2001 From: "hanno@schwalm-bremen.de" Date: Sat, 16 Mar 2024 08:45:55 +0100 Subject: [PATCH] Safe pixelpipe caching for dt_dev_pixelpipe_process() If we have this called with pipe->type having the DT_DEV_PIXELPIPE_IMAGE bit set as called from dt_dev_image() we don't want to use the pipe cache but instead do simple 2-buffer swapping. sdvsd --- src/develop/pixelpipe_cache.c | 2 +- src/develop/pixelpipe_hb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/develop/pixelpipe_cache.c b/src/develop/pixelpipe_cache.c index 2c765530195f..52444f744e9c 100644 --- a/src/develop/pixelpipe_cache.c +++ b/src/develop/pixelpipe_cache.c @@ -87,7 +87,7 @@ void dt_dev_pixelpipe_cache_cleanup(struct dt_dev_pixelpipe_t *pipe) { dt_dev_pixelpipe_cache_t *cache = &(pipe->cache); - if(pipe->type & DT_DEV_PIXELPIPE_FULL) + if(pipe->type == DT_DEV_PIXELPIPE_FULL) { dt_print(DT_DEBUG_PIPE, "Session fullpipe cache report. hits/run=%.2f, hits/test=%.3f\n", (double)(cache->hits) / fmax(1.0, pipe->runs), diff --git a/src/develop/pixelpipe_hb.c b/src/develop/pixelpipe_hb.c index 8d0218c30c78..fe1e148fb0b1 100644 --- a/src/develop/pixelpipe_hb.c +++ b/src/develop/pixelpipe_hb.c @@ -2633,7 +2633,7 @@ gboolean dt_dev_pixelpipe_process( const int devid) { pipe->processing = TRUE; - pipe->nocache = FALSE; + pipe->nocache = (pipe->type & DT_DEV_PIXELPIPE_IMAGE) != 0; pipe->runs++; pipe->opencl_enabled = dt_opencl_running();