Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_process.h
Go to the documentation of this file.
1/*
2 Private pixelpipe process API shared by pixelpipe_hb.c, pixelpipe_cpu.c and pixelpipe_gpu.c.
3*/
4
5#pragma once
6
7#include "common/darktable.h"
9#include "develop/tiling.h"
10
11#include <string.h>
12
25
32
45static inline gboolean _bypass_cache(const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
46{
47 return pipe && (pipe->reentry || pipe->bypass_cache || pipe->no_cache || (piece && piece->bypass_cache));
48}
49
59static inline gboolean _requests_cache(const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
60{
61 return pipe && !_bypass_cache(pipe, piece);
62}
63
74{
75 if(piece == NULL) return;
76
77 memset(&piece->cache_entry, 0, sizeof(piece->cache_entry));
79}
80
82 gboolean is_cl, const dt_iop_buffer_dsc_t *in_dsc,
83 const dt_iop_buffer_dsc_t *out_dsc, const dt_iop_roi_t *roi_in,
84 const dt_iop_roi_t *roi_out, size_t in_bpp, size_t out_bpp,
85 int cst_before, int cst_after);
86
88 const dt_dev_pixelpipe_iop_t *piece,
89 const dt_iop_buffer_dsc_t *output_dsc);
90
92 const dt_pixel_cache_entry_t *cache_entry);
93
94void dt_dev_pixelpipe_gpu_clear_buffer(void **cl_mem_buffer, dt_pixel_cache_entry_t *cache_entry,
95 void *host_ptr, gboolean allow_reuse);
#define DT_PIXELPIPE_CACHE_HASH_INVALID
Definition pixelpipe_cache.h:41
dt_pixelpipe_flow_t
Definition pixelpipe_process.h:14
@ PIXELPIPE_FLOW_HISTOGRAM_ON_GPU
Definition pixelpipe_process.h:18
@ PIXELPIPE_FLOW_HISTOGRAM_NONE
Definition pixelpipe_process.h:16
@ PIXELPIPE_FLOW_PROCESSED_ON_CPU
Definition pixelpipe_process.h:19
@ PIXELPIPE_FLOW_PROCESSED_WITH_TILING
Definition pixelpipe_process.h:21
@ PIXELPIPE_FLOW_PROCESSED_ON_GPU
Definition pixelpipe_process.h:20
@ PIXELPIPE_FLOW_NONE
Definition pixelpipe_process.h:15
@ PIXELPIPE_FLOW_BLENDED_ON_CPU
Definition pixelpipe_process.h:22
@ PIXELPIPE_FLOW_HISTOGRAM_ON_CPU
Definition pixelpipe_process.h:17
@ PIXELPIPE_FLOW_BLENDED_ON_GPU
Definition pixelpipe_process.h:23
static void _reset_piece_cache_entry(dt_dev_pixelpipe_iop_t *piece)
Drop the writable-reuse snapshot attached to a pipeline piece.
Definition pixelpipe_process.h:73
gboolean dt_dev_pixelpipe_cache_gpu_device_buffer(const dt_dev_pixelpipe_t *pipe, const dt_pixel_cache_entry_t *cache_entry)
Definition pixelpipe_hb.c:251
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.
Definition pixelpipe_process.h:59
void dt_dev_pixelpipe_gpu_clear_buffer(void **cl_mem_buffer, dt_pixel_cache_entry_t *cache_entry, void *host_ptr, gboolean allow_reuse)
Definition pixelpipe_gpu.c:18
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)
Definition pixelpipe_hb.c:360
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.
Definition pixelpipe_process.h:45
dt_pixelpipe_blend_transform_t
Definition pixelpipe_process.h:27
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_INPUT
Definition pixelpipe_process.h:29
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_NONE
Definition pixelpipe_process.h:28
@ DT_DEV_PIXELPIPE_BLEND_TRANSFORM_OUTPUT
Definition pixelpipe_process.h:30
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)
Definition pixelpipe_hb.c:631
Definition pixelpipe_hb.h:95
gboolean bypass_cache
Definition pixelpipe_hb.h:143
dt_pixel_cache_entry_t cache_entry
Definition pixelpipe_hb.h:151
Definition pixelpipe_hb.h:216
gboolean reentry
Definition pixelpipe_hb.h:323
gboolean no_cache
Definition pixelpipe_hb.h:343
gboolean bypass_cache
Definition pixelpipe_hb.h:338
Definition develop/format.h:48
Definition imageop.h:216
Definition imageop.h:67
Definition pixelpipe_cache.h:86
uint64_t hash
Definition pixelpipe_cache.h:87