A flatpak for LuxMark 3 to debug work-in-progress OpenCL platforms on Linux

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
illwieckz
Posts: 16
Joined: Tue May 17, 2022 11:41 pm

A flatpak for LuxMark 3 to debug work-in-progress OpenCL platforms on Linux

Post by illwieckz »

For people interested in OpenCL platform development (Rusticl, Clover, name-your-own), here is my script to build and run a patched LuxMark 3 with many things to make it a good tool to debug OpenCL platforms:
The LuxMark 3 tool is now patched to be built with Qt5 so that simplifies a lot the dependencies (before it required to build Qt4 first that required to build GCC7 first that required GCC 10… that was a hell of a hell :lol:)

Some highlights:
  • Luxmark 3.1 now catches all the various OpenCL errors (missing platform, platform without device, OpenCL compilation error…) instead of just crashing, printing the useful log message.
  • The log is also printed on stderr to avoid losing it in case of LuxMark crash.
  • Various environment variables to select specific code paths (BVH, QBVH, image support or not), add extra OpenCL compiler options, pre-fill submission form, etc.
  • The bugfix to be compatible with LLVM-based platforms (Clover, ROCm), see https://forums.luxcorerender.org/viewtopic.php?t=4600
This rebuilds compatible OpenImageIO and Embree, then LuxCore and LuxMark on `luxmark_v3.1` tag with patches applied. Some patches fix the building of the various pieces of software, others add features and fix bugs.

I only tested those patches on Linux, the build script is meant to run on Linux (I use it on Ubuntu 22.04).

This was motivated to make LuxMark 3 a good tool to test and debug OpenCL platforms. 8-)

I use LuxMark 3 a lot to test OpenCL platforms including the work-in-progress and promising RustiCL.

Maybe in the future I'll evaluate the ability to make a flatpak from that (including all the useful patches) as I have verified it's possible to run a flatpak application with a non-system OpenCL platform using some advanced flatpak options. It means an OpenCL platform developer would be able to test its work-in-progress OpenCL implementation with the flatpak.

Maybe some features can be ported to the work-in-progress LuxMark 4 or even the released LuxCoreRender if there are things that can be used? :?:
Last edited by illwieckz on Tue Oct 25, 2022 12:58 am, edited 2 times in total.
illwieckz
Posts: 16
Joined: Tue May 17, 2022 11:41 pm

Re: My heavily patched LuxMark 3 to debug work-in-progress OpenCL platforms

Post by illwieckz »

I managed to build locally a luxmark3 flatpak that can be used with in-development OpenCL platforms. :)

Before I submit it to flathub, what name should I give to this flatpak? I see two possibilities (it's a hierarchical name based on domain name):
  • info.luxmark.luxmark3
  • org.luxcorerender.luxmark3
In all case I consider it's a good idea to name it “luxmark3” and not just “luxmark” this way luxmark 3 flatpak will be kept available even when luxmark4 will be released.
illwieckz
Posts: 16
Joined: Tue May 17, 2022 11:41 pm

Re: My heavily patched LuxMark 3 to debug work-in-progress OpenCL platforms

Post by illwieckz »

Here is my work-in-progress flatpak recipe: https://github.com/illwieckz/info.luxmark.luxmark3

It is not submitted to flathub yet.
illwieckz
Posts: 16
Joined: Tue May 17, 2022 11:41 pm

Re: My heavily patched LuxMark 3 to debug work-in-progress OpenCL platforms

Post by illwieckz »

I added patches to replace the now name-squatted luxrender-dot-net urls by the current https://luxcorerender.org one.
I also added patches enabling build on aarch64. I have not tested yet if aarch64 flatpak builds but non-flatpak build works.

Outside of the question about the name of the flatpak, to submit it to flathub I will have to check that checkbox:

- [ ] I am an upstream contributor to the project. If not, I contacted upstream developers about submitting their software to Flathub.
illwieckz
Posts: 16
Joined: Tue May 17, 2022 11:41 pm

Re: My heavily patched LuxMark 3 to debug work-in-progress OpenCL platforms

Post by illwieckz »

I updated the flatpak to also build SLG4. Now the flatpak provides no less features than the original 3.1 LuxMark release:

https://github.com/illwieckz/info.luxmark.luxmark3
Post Reply