Skip to content

Implement and use OpenCL buffer and image fill functions#21155

Open
jenshannoschwalm wants to merge 1 commit into
darktable-org:masterfrom
jenshannoschwalm:buff_and_image_fills
Open

Implement and use OpenCL buffer and image fill functions#21155
jenshannoschwalm wants to merge 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

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.
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