Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_process.h File Reference
#include "common/darktable.h"
#include "develop/pixelpipe_hb.h"
#include "develop/tiling.h"
#include <string.h>
+ Include dependency graph for pixelpipe_process.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum dt_pixelpipe_flow_t dt_pixelpipe_flow_t
 
typedef enum dt_pixelpipe_blend_transform_t dt_pixelpipe_blend_transform_t
 

Enumerations

enum  dt_pixelpipe_flow_t {
  PIXELPIPE_FLOW_NONE = 0 ,
  PIXELPIPE_FLOW_HISTOGRAM_NONE = 1 << 0 ,
  PIXELPIPE_FLOW_HISTOGRAM_ON_CPU = 1 << 1 ,
  PIXELPIPE_FLOW_HISTOGRAM_ON_GPU = 1 << 2 ,
  PIXELPIPE_FLOW_PROCESSED_ON_CPU = 1 << 3 ,
  PIXELPIPE_FLOW_PROCESSED_ON_GPU = 1 << 4 ,
  PIXELPIPE_FLOW_PROCESSED_WITH_TILING = 1 << 5 ,
  PIXELPIPE_FLOW_BLENDED_ON_CPU = 1 << 6 ,
  PIXELPIPE_FLOW_BLENDED_ON_GPU = 1 << 7
}
 
enum  dt_pixelpipe_blend_transform_t {
  DT_DEV_PIXELPIPE_BLEND_TRANSFORM_NONE = 0 ,
  DT_DEV_PIXELPIPE_BLEND_TRANSFORM_INPUT = 1 << 0 ,
  DT_DEV_PIXELPIPE_BLEND_TRANSFORM_OUTPUT = 1 << 1
}
 

Functions

static gboolean _bypass_cache (const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 Tell whether the current pipeline state forbids keeping this module output in cache.
 
static gboolean _requests_cache (const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 Tell whether cache lookups and published cachelines are allowed for the current pipeline state.
 
static void _reset_piece_cache_entry (dt_dev_pixelpipe_iop_t *piece)
 Drop the writable-reuse snapshot attached to a pipeline piece.
 
void dt_dev_pixelpipe_debug_dump_module_io (dt_dev_pixelpipe_t *pipe, dt_iop_module_t *module, const char *stage, gboolean is_cl, const dt_iop_buffer_dsc_t *in_dsc, const dt_iop_buffer_dsc_t *out_dsc, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, size_t in_bpp, size_t out_bpp, int cst_before, int cst_after)
 
dt_pixelpipe_blend_transform_t dt_dev_pixelpipe_transform_for_blend (const dt_iop_module_t *self, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_buffer_dsc_t *output_dsc)
 
gboolean dt_dev_pixelpipe_cache_gpu_device_buffer (const dt_dev_pixelpipe_t *pipe, const dt_pixel_cache_entry_t *cache_entry)
 
void dt_dev_pixelpipe_gpu_clear_buffer (void **cl_mem_buffer, dt_pixel_cache_entry_t *cache_entry, void *host_ptr, gboolean allow_reuse)
 

Typedef Documentation

◆ dt_pixelpipe_blend_transform_t

◆ dt_pixelpipe_flow_t

Enumeration Type Documentation

◆ dt_pixelpipe_blend_transform_t

Enumerator
DT_DEV_PIXELPIPE_BLEND_TRANSFORM_NONE 
DT_DEV_PIXELPIPE_BLEND_TRANSFORM_INPUT 
DT_DEV_PIXELPIPE_BLEND_TRANSFORM_OUTPUT 

◆ dt_pixelpipe_flow_t

Enumerator
PIXELPIPE_FLOW_NONE 
PIXELPIPE_FLOW_HISTOGRAM_NONE 
PIXELPIPE_FLOW_HISTOGRAM_ON_CPU 
PIXELPIPE_FLOW_HISTOGRAM_ON_GPU 
PIXELPIPE_FLOW_PROCESSED_ON_CPU 
PIXELPIPE_FLOW_PROCESSED_ON_GPU 
PIXELPIPE_FLOW_PROCESSED_WITH_TILING 
PIXELPIPE_FLOW_BLENDED_ON_CPU 
PIXELPIPE_FLOW_BLENDED_ON_GPU 

Function Documentation

◆ _bypass_cache()

static gboolean _bypass_cache ( const dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)
inlinestatic

Tell whether the current pipeline state forbids keeping this module output in cache.

This aggregates all pipeline-wide and module-local policy switches that turn cache lines into disposable buffers:

  • pipe re-entry,
  • pipe-wide cache bypass,
  • no-cache pipelines,
  • module-local cache bypass.

References dt_dev_pixelpipe_iop_t::bypass_cache, dt_dev_pixelpipe_t::bypass_cache, dt_dev_pixelpipe_t::no_cache, and dt_dev_pixelpipe_t::reentry.

Referenced by _requests_cache(), and dt_dev_pixelpipe_process_rec().

◆ _requests_cache()

static gboolean _requests_cache ( const dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)
inlinestatic

Tell whether cache lookups and published cachelines are allowed for the current pipeline state.

DT_DEBUG_NOCACHE_REUSE is intentionally not handled here. That debug mode is meant to disable writable output reuse, not to disable cache reads entirely. Exact hits on already published cachelines are still valid in that mode, but later writable acquisition must refuse to reopen those cachelines for overwrite.

References _bypass_cache().

Referenced by dt_dev_pixelpipe_process(), and dt_dev_pixelpipe_process_rec().

◆ _reset_piece_cache_entry()

static void _reset_piece_cache_entry ( dt_dev_pixelpipe_iop_t piece)
inlinestatic

Drop the writable-reuse snapshot attached to a pipeline piece.

piece->cache_entry is only a hint telling the cache that a previously published cacheline may be rekeyed and fully overwritten on a later pass. If we decide to keep the current module output as a long-term cacheline instead, that hint must disappear completely so no stale pointer, serial, lock or metadata survives the decision.

References dt_dev_pixelpipe_iop_t::cache_entry, DT_PIXELPIPE_CACHE_HASH_INVALID, and dt_pixel_cache_entry_t::hash.

Referenced by _abort_module_shutdown_cleanup(), dt_dev_pixelpipe_create_nodes(), and dt_dev_pixelpipe_process_rec().

◆ dt_dev_pixelpipe_cache_gpu_device_buffer()

gboolean dt_dev_pixelpipe_cache_gpu_device_buffer ( const dt_dev_pixelpipe_t pipe,
const dt_pixel_cache_entry_t cache_entry 
)

◆ dt_dev_pixelpipe_debug_dump_module_io()

void dt_dev_pixelpipe_debug_dump_module_io ( dt_dev_pixelpipe_t pipe,
dt_iop_module_t module,
const char *  stage,
gboolean  is_cl,
const dt_iop_buffer_dsc_t in_dsc,
const dt_iop_buffer_dsc_t out_dsc,
const dt_iop_roi_t roi_in,
const dt_iop_roi_t roi_out,
size_t  in_bpp,
size_t  out_bpp,
int  cst_before,
int  cst_after 
)

◆ dt_dev_pixelpipe_gpu_clear_buffer()

void dt_dev_pixelpipe_gpu_clear_buffer ( void **  cl_mem_buffer,
dt_pixel_cache_entry_t cache_entry,
void host_ptr,
gboolean  allow_reuse 
)

◆ dt_dev_pixelpipe_transform_for_blend()