Bug 107115 - Make darktable OpenCL support work on Clover and RadeonSI
Summary: Make darktable OpenCL support work on Clover and RadeonSI
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Gallium/StateTracker/Clover (show other bugs)
Version: git
Hardware: x86-64 (AMD64) FreeBSD
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on: 87738
Blocks: 99553
  Show dependency treegraph
 
Reported: 2018-07-04 19:30 UTC by Greg V
Modified: 2019-09-18 18:02 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Greg V 2018-07-04 19:30:29 UTC
Hi everyone, I've tried to get the darktable photo editor https://www.darktable.org to work, and there's more to it than image support...

First, I've picked up funfunctor's patches (mentioned in bug 99553), they applied cleanly to master (except for the little one-line "= 1" since the r600/radeonsi split happened, but that was trivial to fix). My branch with them is https://github.com/myfreeweb/mesa/tree/clover-image

Second, there was some weird mismatch between libclc's headers and darktable's code, and I've had to do:

%s/write_only image2d_t/image2d_t

and

%s/__image2d_t/image2d_t

on all files in PREFIX/share/darktable/kernels.

Third, the liquify.cl kernel triggered the https://bugs.llvm.org/show_bug.cgi?id=36679 crash (which is fixed in llvm 7... but I just removed the function body to proceed without this particular effect)

And finally, with all kernels compiled, darktable benchmarked CPU vs GPU and found the CPU to be a bit faster (yay for Ryzen) and disabled OpenCL usage.

Enabling OpenCL usage in the settings and then double clicking on an image... uhh... hard locked the GPU :D

drmn0: GPU fault detected: 147 0x05004402
drmn0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x005000A0
drmn0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x08044002
drmn0: VM fault (0x02, vmid 4) at page 5243040, read from 'TC5' (0x54433500) (68)

P.S. system info: AMD Radeon RX 480, FreeBSD 12-CURRENT / drm-next-kmod 4.15 (DRM 3.23.0) with amdgpu.dc=1, LLVM 6.0.0, Mesa with patches on top of git rev c2ae9b4052701, libclc git rev c45b9dfe5257, darktable 2.4.4.
Comment 1 darkbasic 2018-07-04 19:39:34 UTC
Awesome, I really hope that you will succeed!
Comment 2 Jan Vesely 2018-07-04 22:02:20 UTC
This sounds like darktable needs image support.
Comment 3 GitLab Migration User 2019-09-18 18:02:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/143.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.