Skip to content

Various maintenance for tiling and opencl#21075

Merged
TurboGit merged 3 commits into
darktable-org:masterfrom
jenshannoschwalm:various_maintenance_2
May 20, 2026
Merged

Various maintenance for tiling and opencl#21075
TurboGit merged 3 commits into
darktable-org:masterfrom
jenshannoschwalm:various_maintenance_2

Conversation

@jenshannoschwalm
Copy link
Copy Markdown
Collaborator

A bit of OpenCL maintenance

  1. Various functions are just internal helpers not used outside of the source scope and thus should not be exposed.
    dt_opencl_read_host_from_device_rowpitch()
    dt_opencl_write_host_to_device_rowpitch()
  2. Some correct use of #defines and constify

Improved tiling related logs

  1. dt_print_pipe() got a minor improvement, it now shows a leading T in the pipe name if in tiling mode.
  2. use dt_print_pipe() variant where automatic display of roi is helping
  3. overlap added to logs where helping
  4. some logs are shown only in -d verbose mode
  5. some logs are also relevant for -d pipe logs
  6. added log for skipped tiles in ptp mode
  7. added module instance in control logs
  8. For extensive debug logs we now have compile time option DT_TILING_DEBUG
  9. some constify, subtle simplifications and use of float where intended

@jenshannoschwalm jenshannoschwalm added this to the 5.6 milestone May 20, 2026
@jenshannoschwalm jenshannoschwalm added scope: codebase making darktable source code easier to manage scope: debugging labels May 20, 2026
@jenshannoschwalm
Copy link
Copy Markdown
Collaborator Author

@TurboGit still checking

  1. possible output corruption for ptp tiling (that would be release critical)
  2. enforced ptp tiling (both for CPU and GPU) in cases where we later skip tiles.

BTW, Could we add a -d mini switch to the integration testsuite? That would be very slow and nothing to be done regularly but would enforce modules to be processed in tiling mode which almost never happens now.

@jenshannoschwalm jenshannoschwalm force-pushed the various_maintenance_2 branch 3 times, most recently from a648af3 to fedbc45 Compare May 20, 2026 06:13
@jenshannoschwalm
Copy link
Copy Markdown
Collaborator Author

@TurboGit TIA i just added a third bug-fixing-commit. That's about fixing overestimations of tiling requirements when blending is involved!

@jenshannoschwalm jenshannoschwalm added bugfix pull request fixing a bug priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: performance doing everything the same but faster OpenCL Related to darktable OpenCL code labels May 20, 2026
1. Various functions are just internal helpers not used outside of the source scope and thus should
   not be exposed.
 dt_opencl_read_host_from_device_rowpitch()
 dt_opencl_write_host_to_device_rowpitch()

2. Some correct use of #defines and constify
1. dt_print_pipe() got a minor improvement, it now shows a leading `T` in the pipe name if
   in tiling mode.
2. use dt_print_pipe() variant where automatic display of roi is helping
3. overlap added to logs where helping
4. some logs are shown only in -d verbose mode
5. some logs are also relevant for -d pipe logs
6. added log for skipped tiles in ptp mode
7. added module instance in control logs
8. For extensive debug logs we now have compile time option DT_TILING_DEBUG
9. some constify, subtle simplifications and use of float where intended
If we blend a piece output there are additional requirements for memory to be checked.
Some calculations lead to higher results than necessary if no feathering was involved.
@jenshannoschwalm jenshannoschwalm force-pushed the various_maintenance_2 branch from b8f2872 to 8bb62f1 Compare May 20, 2026 10:30
Comment thread src/develop/blend.c
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, thanks!

@TurboGit TurboGit merged commit d60b9f0 into darktable-org:master May 20, 2026
5 checks passed
@TurboGit
Copy link
Copy Markdown
Member

BTW, Could we add a -d mini switch to the integration testsuite?

I have created an issue for this and assigned it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug OpenCL Related to darktable OpenCL code priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: codebase making darktable source code easier to manage scope: debugging scope: performance doing everything the same but faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants