Skip to content

Implement and use OpenCL buffer and image fill functions#21155

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
jenshannoschwalm:buff_and_image_fills
Jul 22, 2026
Merged

Implement and use OpenCL buffer and image fill functions#21155
TurboGit merged 1 commit into
darktable-org:masterfrom
jenshannoschwalm:buff_and_image_fills

Conversation

@jenshannoschwalm

@jenshannoschwalm jenshannoschwalm commented May 27, 2026

Copy link
Copy Markdown
Collaborator

OpenCL 1.2 offers clEnqueueFillBuffer() and clEnqueueFillImage(), they now are linked and made available as

  • dt_clEnqueueFillBuffer()
  • dt_clEnqueueFillImage()

Having them instead of specific kernels

  • simplifies code
  • results in some small perf gains as both are faster than the kernels.

No diffs/regressions in integration tests. Both functions are 100% equivalen for the callers.

@jenshannoschwalm jenshannoschwalm added scope: image processing correcting pixels scope: performance doing everything the same but faster scope: codebase making darktable source code easier to manage OpenCL Related to darktable OpenCL code labels May 27, 2026
@TurboGit TurboGit added this to the 5.8 milestone May 27, 2026
@jenshannoschwalm
jenshannoschwalm force-pushed the buff_and_image_fills branch 2 times, most recently from e47e60e to 3d9e5df Compare June 10, 2026 17:16
@jenshannoschwalm
jenshannoschwalm force-pushed the buff_and_image_fills branch 3 times, most recently from 7290383 to cd94cb9 Compare June 21, 2026 09:06
@jenshannoschwalm

Copy link
Copy Markdown
Collaborator Author

Integration testsuite ok

@jenshannoschwalm
jenshannoschwalm force-pushed the buff_and_image_fills branch 2 times, most recently from 1f7cbaf to 2f2bb84 Compare June 30, 2026 19:31
@jenshannoschwalm
jenshannoschwalm force-pushed the buff_and_image_fills branch 2 times, most recently from 4cbbb58 to 501a489 Compare July 17, 2026 05:07
OpenCL 1.2 offers clEnqueueFillBuffer(), clEnqueueFillImage() and clEnqueueMigrateMemObjects(),
they now are linked and made available as
- dt_clEnqueueFillBuffer
- dt_clEnqueueFillImage
- dt_clEnqueueMigrateMemObjects

Having the fill functions instead of specific kernels
- simplifies code
- results in some small perf gains as both are faster than the specific kernels.

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@TurboGit
TurboGit merged commit 2d366e7 into darktable-org:master Jul 22, 2026
5 checks passed
@jenshannoschwalm
jenshannoschwalm deleted the buff_and_image_fills branch July 22, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OpenCL Related to darktable OpenCL code scope: codebase making darktable source code easier to manage scope: image processing correcting pixels scope: performance doing everything the same but faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants