![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/pipe_cache_policy.h"#include <stdarg.h>#include <stddef.h>#include <setjmp.h>#include <stdint.h>#include <cmocka.h>
Include dependency graph for test_pipe_cache_policy.c:Go to the source code of this file.
A node that cannot run on the GPU at all: it produces host data by construction.
Definition at line 49 of file test_pipe_cache_policy.c.
References dt_dev_pipe_cache_policy_decide(), FALSE, L, state, dt_dev_pipe_cache_policy_inputs_t::supports_opencl, and void().
Referenced by main().
Each of the five own-input reasons must raise the upstream requirement by itself.
Definition at line 101 of file test_pipe_cache_policy.c.
References _gpu_node_with_no_needs(), dt_dev_pipe_cache_policy_decide(), FALSE, i, L, state, TRUE, and void().
Referenced by main().
Each of the four own-output reasons must raise this node's own requirement by itself.
Definition at line 123 of file test_pipe_cache_policy.c.
References _gpu_node_with_no_needs(), dt_dev_pipe_cache_policy_decide(), FALSE, i, L, state, TRUE, and void().
Referenced by main().
THE REGRESSION. An enabled, GPU-capable node that needs no host input of its own must PASS THROUGH a requirement inherited from further downstream, not replace it.
This was an ‘=’ rather than an ‘||’. Toggling on a GPU module with no host needs of its own (iop/rawoverexposed.c: NO_HISTORY_STACK, GPU-capable, no GUI or histogram reason) erased the TRUE that a CPU-only module further downstream (dither) had correctly established. colorout then skipped its GPU-to-host readback, and dither read the stale bytes left in the cacheline's previous life – every hash and ROI in the chain individually correct.
Definition at line 86 of file test_pipe_cache_policy.c.
References _gpu_node_with_no_needs(), dt_dev_pipe_cache_policy_decide(), FALSE, L, state, TRUE, and void().
Referenced by main().
Definition at line 64 of file test_pipe_cache_policy.c.
References _gpu_node_with_no_needs(), dt_dev_pipe_cache_policy_decide(), FALSE, L, state, TRUE, and void().
Referenced by main().
|
static |
Which pipeline nodes must keep a host-RAM copy of their output.
These tests exist because nothing else can see this. The per-piece cache_output_on_ram flag changes no exported pixel – the export path drives the pipe directly and never reaches the seal that computes it – changes no hash, and produces no log unless someone is already looking. When it was wrong, the symptom was a downstream module reading stale host bytes from a rekeyed cacheline, only with OpenCL enabled, and it was found by dumping GPU buffers.
The propagation test below is that bug, pinned. A GPU-capable node with no reason of its own to want host data.
Definition at line 41 of file test_pipe_cache_policy.c.
References L, dt_dev_pipe_cache_policy_inputs_t::supports_opencl, and TRUE.
Referenced by _each_own_input_reason_raises_upstream(), _each_own_output_reason_raises_own(), _gpu_node_propagates_an_inherited_requirement(), _gpu_node_requires_nothing_on_its_own(), and _null_upstream_pointer_is_allowed().
A NULL out-param is allowed: the last node in the walk has nobody upstream to tell.
Definition at line 146 of file test_pipe_cache_policy.c.
References _gpu_node_with_no_needs(), dt_dev_pipe_cache_policy_decide(), FALSE, L, state, TRUE, and void().
Referenced by main().
| int main | ( | void | ) |
Definition at line 155 of file test_pipe_cache_policy.c.
References _cpu_only_node_needs_its_input_on_host(), _each_own_input_reason_raises_upstream(), _each_own_output_reason_raises_own(), _gpu_node_propagates_an_inherited_requirement(), _gpu_node_requires_nothing_on_its_own(), _null_upstream_pointer_is_allowed(), and L.