Two pixelpipe bugfixes plus maintenance #21106
Merged
TurboGit merged 4 commits intoMay 23, 2026
Merged
Conversation
Before a piece is processed the pixelpipe checks if the current cst is different from the module's requested input cst. In this case, the input data are converted in-place (for less pixelpipe mem pressure) but then the cacheline - possibly kept for reuse - has an incorrect cst! Note: in opencl code path this is different as the required colorspace conversion is always done in cl_mem and thus does not affect the pixelpipe cache. For now we just invalidate that single cacheline. Fixme: we should implement and use a pipecache helper that modifies the cacheline cst.
If we process the preview pixelpipe on CPU - either because there is no OpenCL device at all or the OpenCL scheduler delivered the pipe to the CPU - the importance hint for the cacheline was not tested correctly so with a performance penalty.
Use correct `dt_iop_colorspace_type_t` instead of `int` for `dt_ioppr_transform_image_colorspace()` and `dt_ioppr_transform_image_colorspace_cl()`
1. refactored `_is_debug_pipe()` also testing for a no-shutdown situation. 2. refactored the cpu bound benchmark loop. Both benchmarks check for shutdown in (1) 3. some `_pipe_has_shutdown()` tests have been removed as clearly not helping 4. Some constify work, use of #defines and log improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(1) Bugfix CPU pixelpipe cache integrity after module colorspace conversion
Before a piece is processed the pixelpipe checks if the current cst is different from the module's requested input cst.
In this case, the input data are converted in-place (for less pixelpipe mem pressure) but then the cacheline - possibly kept for reuse - has an incorrect cst!
Note: in opencl code path this is different as the required colorspace conversion is always done in cl_mem and thus does not affect the pixelpipe cache.
For now we just invalidate that single cacheline.
Comment: Quite an old bug! Very hard to trigger with current code - might have been the underlying cause for some "fixes" done invalidating the pipecache :-) Also not sure if this could be a reason for false color issues while being in darkroom.
(2) Performance regression: Fix preview pixelpipe caching issue
If we process the preview pixelpipe on CPU - either because there is no OpenCL device at all or the OpenCL scheduler delivered the pipe to the CPU - the importance hint for the cacheline was not tested correctly so with a performance penalty.
(3) maintenance:The colorspace transform functions use
dt_iop_colorspace_type_t()Use correct
dt_iop_colorspace_type_tinstead ofintfordt_ioppr_transform_image_colorspace()anddt_ioppr_transform_image_colorspace_cl()(4) Some maintenance work for pixelpipe processing
_is_debug_pipe()also testing for a no-shutdown situation._pipe_has_shutdown()tests have been removed as clearly not helping#defineand log improvements@TurboGit no integration tests regressions, nothing "new"