Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dev_pixelpipe.c File Reference
#include "common/debug.h"
#include "common/darktable.h"
#include "common/dtpthread.h"
#include "develop/imageop.h"
#include "develop/pixelpipe.h"
#include "develop/pixelpipe_gui.h"
#include "develop/blend.h"
#include "gui/color_picker_proxy.h"
#include "control/control.h"
#include <stdint.h>
+ Include dependency graph for dev_pixelpipe.c:

Functions

static void _sync_virtual_pipe (dt_develop_t *dev, dt_dev_pixelpipe_change_t flag)
 
static gchar * _get_debug_pipe_name (const dt_dev_pixelpipe_t *pipe, const dt_develop_t *dev)
 
static void _change_pipe (dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_change_t flag)
 
static void _seal_opencl_cache_policy (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev)
 Seal host-cache retention policy on synchronized pieces before processing starts.
 
void dt_dev_pixelpipe_rebuild_all_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_resync_history_main_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_resync_history_preview_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_resync_history_all_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_update_history_main_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_update_history_preview_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_update_history_all_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_update_zoom_preview_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_update_zoom_main_real (dt_develop_t *dev)
 
void dt_dev_pixelpipe_reset_all (dt_develop_t *dev)
 
void dt_dev_pixelpipe_change_zoom_main (dt_develop_t *dev)
 
gboolean dt_dev_pixelpipe_activemodule_disables_currentmodule (struct dt_develop_t *dev, struct dt_iop_module_t *current_module)
 
void dt_dev_pixelpipe_get_roi_out (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, const int width_in, const int height_in, int *width, int *height)
 
void dt_dev_pixelpipe_get_roi_in (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, const struct dt_iop_roi_t roi_out)
 
static uint64_t _default_pipe_hash (dt_dev_pixelpipe_t *pipe)
 
uint64_t dt_dev_pixelpipe_node_hash (dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t roi_out, const int pos)
 
const dt_dev_pixelpipe_iop_tdt_dev_pixelpipe_get_module_piece (const dt_dev_pixelpipe_t *pipe, const dt_iop_module_t *module)
 
const dt_dev_pixelpipe_iop_tdt_dev_pixelpipe_get_prev_enabled_piece (const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
static gboolean _prepare_piece_input_contract (dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_buffer_dsc_t *upstream_dsc)
 
static void _commit_piece_contract (dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, dt_iop_params_t *params, dt_develop_blend_params_t *blend_params, dt_iop_buffer_dsc_t *upstream_dsc)
 
static void _sync_pipe_nodes_from_history (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev, const uint32_t history_end, const char *debug_label)
 
static void _sync_pipe_nodes_from_history_from_node (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev, const uint32_t history_end, GList *start_node, const char *debug_label)
 
void dt_pixelpipe_get_global_hash (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev)
 
void dt_dev_pixelpipe_synch_all_real (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev, const char *caller_func)
 Find the last history item matching each pipeline node (module), in the order of pipeline execution. This is super important because modules providing raster masks need to be inited before modules using them, in the order of pipeline nodes. But history holds no guaranty that raster masks providers will be older than raster masks users, especially after history compression. So reading in history order is not an option.
 
void dt_dev_pixelpipe_synch_top (dt_dev_pixelpipe_t *pipe, dt_develop_t *dev)
 
void dt_dev_pixelpipe_change (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
void dt_dev_pixelpipe_sync_virtual (dt_develop_t *dev, dt_dev_pixelpipe_change_t flag)
 
gboolean dt_dev_pixelpipe_is_backbufer_valid (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
gboolean dt_dev_pixelpipe_is_pipeline_valid (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 

Function Documentation

◆ _change_pipe()

◆ _commit_piece_contract()

◆ _default_pipe_hash()

◆ _get_debug_pipe_name()

◆ _prepare_piece_input_contract()

◆ _seal_opencl_cache_policy()

static void _seal_opencl_cache_policy ( dt_dev_pixelpipe_t pipe,
dt_develop_t dev 
)
static

Seal host-cache retention policy on synchronized pieces before processing starts.

piece->force_opencl_cache is part of the sealed runtime contract: the processing recursion only consumes it and must not infer GUI/runtime heuristics while running. This pass therefore authors all host-cache retention requests immediately after history synchronization, while the live pipe graph and current GUI state are both known.

The reverse walk carries one upstream requirement: "the previous enabled module must keep its output on host because the current enabled module will read from RAM instead of OpenCL".

We add to that:

  • the module's own authored force_opencl_cache,
  • user cache preferences,
  • active color-picker sampling,
  • global histogram stages sampling their output,
  • active GUI editing on the module itself.

References dt_dev_pixelpipe_iop_t::data, dt_conf_get_bool(), dt_conf_key_exists(), dt_conf_key_not_empty(), dt_conf_set_bool(), dt_dev_module_requires_global_histogram_input_cache(), dt_dev_module_requires_global_histogram_output_cache(), DT_DEV_PIXELPIPE_FULL, DT_DEV_PIXELPIPE_PREVIEW, dt_free, dt_iop_color_picker_force_cache(), dt_opencl_is_inited(), DT_REQUEST_ON, DT_REQUEST_ONLY_IN_GUI, dt_dev_pixelpipe_iop_t::enabled, FALSE, dt_dev_pixelpipe_iop_t::force_opencl_cache, dt_develop_t::gui_attached, dt_develop_t::gui_module, dt_dev_pixelpipe_t::gui_observable_source, dt_dev_pixelpipe_t::nodes, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_dev_pixelpipe_iop_t::request_histogram, TRUE, and dt_dev_pixelpipe_t::type.

Referenced by dt_dev_pixelpipe_change().

◆ _sync_pipe_nodes_from_history()

◆ _sync_pipe_nodes_from_history_from_node()

◆ _sync_virtual_pipe()

◆ dt_dev_pixelpipe_activemodule_disables_currentmodule()

◆ dt_dev_pixelpipe_change()

◆ dt_dev_pixelpipe_change_zoom_main()

◆ dt_dev_pixelpipe_get_module_piece()

◆ dt_dev_pixelpipe_get_prev_enabled_piece()

◆ dt_dev_pixelpipe_get_roi_in()

◆ dt_dev_pixelpipe_get_roi_out()

◆ dt_dev_pixelpipe_is_backbufer_valid()

◆ dt_dev_pixelpipe_is_pipeline_valid()

gboolean dt_dev_pixelpipe_is_pipeline_valid ( dt_dev_pixelpipe_t pipe,
struct dt_develop_t dev 
)

◆ dt_dev_pixelpipe_node_hash()

uint64_t dt_dev_pixelpipe_node_hash ( dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece,
const dt_iop_roi_t  roi_out,
const int  pos 
)

◆ dt_dev_pixelpipe_rebuild_all_real()

◆ dt_dev_pixelpipe_reset_all()

◆ dt_dev_pixelpipe_resync_history_all_real()

◆ dt_dev_pixelpipe_resync_history_main_real()

void dt_dev_pixelpipe_resync_history_main_real ( dt_develop_t dev)

◆ dt_dev_pixelpipe_resync_history_preview_real()

void dt_dev_pixelpipe_resync_history_preview_real ( dt_develop_t dev)

◆ dt_dev_pixelpipe_sync_virtual()

void dt_dev_pixelpipe_sync_virtual ( dt_develop_t dev,
dt_dev_pixelpipe_change_t  flag 
)

References _sync_virtual_pipe(), and flag.

Referenced by gui_post_expose(), and gui_post_expose().

◆ dt_dev_pixelpipe_synch_all_real()

void dt_dev_pixelpipe_synch_all_real ( dt_dev_pixelpipe_t pipe,
dt_develop_t dev,
const char *  caller_func 
)

Find the last history item matching each pipeline node (module), in the order of pipeline execution. This is super important because modules providing raster masks need to be inited before modules using them, in the order of pipeline nodes. But history holds no guaranty that raster masks providers will be older than raster masks users, especially after history compression. So reading in history order is not an option.

Parameters
pipe
dev
caller_func

References _get_debug_pipe_name(), _sync_pipe_nodes_from_history(), DT_DEBUG_DEV, dt_dev_get_history_end_ext(), dt_dev_get_history_hash(), dt_dev_pixelpipe_set_history_hash(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_print(), dt_dev_history_item_t::hash, dt_develop_t::history, dt_dev_pixelpipe_t::last_history_hash, dt_dev_pixelpipe_t::last_history_item, and type.

◆ dt_dev_pixelpipe_synch_top()

◆ dt_dev_pixelpipe_update_history_all_real()

◆ dt_dev_pixelpipe_update_history_main_real()

void dt_dev_pixelpipe_update_history_main_real ( dt_develop_t dev)

◆ dt_dev_pixelpipe_update_history_preview_real()

void dt_dev_pixelpipe_update_history_preview_real ( dt_develop_t dev)

◆ dt_dev_pixelpipe_update_zoom_main_real()

◆ dt_dev_pixelpipe_update_zoom_preview_real()

void dt_dev_pixelpipe_update_zoom_preview_real ( dt_develop_t dev)

◆ dt_pixelpipe_get_global_hash()