Skip to content

Commit

Permalink
Safe pixelpipe caching for dt_dev_pixelpipe_process()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jenshannoschwalm committed Mar 16, 2024
1 parent f475d6f commit 2a5379b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/develop/pixelpipe_cache.c
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/develop/pixelpipe_hb.c
Expand Up @@ -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();

Expand Down

0 comments on commit 2a5379b

Please sign in to comment.