I tried getting them to work by adding with pkgs; [ libGL stdenv.cc.cc.lib vulkan-loader rocm-opencl-icd rocm-opencl-runtime "$HOME/.config/blender/2.93/scripts/addons/rprblender" ] to my LD_LIBRARY_PATH when starting blender.
That seems to enable the plugin to load, but blender crashes with
mesa: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
(I also marked all the *.so files as executable, not sure if that makes a difference.)
I guess multiple LLVM versions get loaded and clash, but I don’t understand why it loads mesa, even if I force amdvlk with VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json.
I got the plugin in version 3.3.15 (latest) and 3.3.0 working by uninstalling rocm (I had it in hardware.opengl.extraPackages) and using with pkgs; [ libGL stdenv.cc.cc.lib vulkan-loader ocl-icd "$HOME/.config/blender/2.93/scripts/addons/rprblender" ] as my LD_LIBRARY_PATH. Enabling the plugin takes a while because it downloads packages and blocks the ui during that time.
The LLVM versions of mesa used for OpenGL and of ROCm clashed.
Thank you for your feedback. But I am still a bit new to Nixos and probably also to Blender. I have read this part NixOS - NixOS 21.11 manual. But at the moment I am not sure how you mean it exactly. Can you briefly show me what you have entered in your configuration.nix. That would help me a lot.
At the moment, it would be enough for me to get “Cycles” and “Eevee” to work via the Gpu. And since I have a Ryzen and AMD GPU, I came up with the “Radeon Pro Render Plugin”.
Ah, I first thought you just wanted to get the Radeon plugin to work and CPU or GPU doesn’t matter.
With the LD_LIBRARY_PATH I set, I still only got the CPU (OpenCL) renderer of the Radeon Pro plugin working.
The problem with rendering on the GPU is that the LLVM versions of mesa (needed for OpenGL/the Blender UI) and ROCm (AMD’s OpenCL implementation for GPU rendering) bite themselves. I found an old issue for that: https://github.com/NixOS/nixpkgs/issues/97401
I couldn’t get the workaround from that ticket (compiling mesa with llvmPackages_rocm) to work because mesa complains about a missing libllvm in llvmPackages_rocm.
Maybe headless rendering in Blender works (as it shouldn’t need OpenGL)?
On a sidenote, Blender 3 will not have an OpenCL renderer but will use cuda on nvidia or hip on amd instead. But as hip builds upon rocm, it ends up with the same problem.
Now I understand all your problems a little better. Thank you very much! OpenCL is also running quite well for me so far.
But I have nothing in my configuration.nix:
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
];
And you mean, if I want to set up the Pro Render plugin, that has to come out again and I have to set the LD_LIBRARY_PATH?
So I can’t use OpenCL and the Pro Render plugin at the same time? So not by changing the settings in Blender.
Have I understood this correctly so far?
But what do you write in configutation.nix to set the LD_LIBRARY_PATH for the Pro Render Plugin? Or do I just have a knot in my head?
I just met the same error on Blender 3.0.0 with RPR plugin 3.3.15, and installed amdgpu pro driver via amdgpu-install. Starting blender with blender-softwaregl could using both GPU / CPU rendering via RPR, but UI became very lagging.
Thank You! Good to hear. But when I start Blender now and set under “Render Properties” → “Cycles” Blender crashes completely. Also when I go to “Edit” → “Preferences” → “System” Blender crashes immediately with this Error:
mesa: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (Speicherabzug geschrieben)
What does that tell me now?
My GPU configuration in the configuration.nix:
hardware.opengl.enable = true;
# To enable vulkan
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
#AMD Graphics Core Next (GCN)
hardware.opengl.extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd
rocm-opencl-runtime
];