GPUOpen-LibrariesAndSDKs / RadeonProRenderBlenderAddon

This hardware-agnostic rendering plug-in for Blender uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
https://gpuopen.com/radeon-prorender-suite/
Apache License 2.0
489 stars 57 forks source link

RPR viewport rendering does not seem to work on Ubuntu 20.04 with latest amdgpu drivers (21.40.1) #401

Open dpospisil opened 3 years ago

dpospisil commented 3 years ago

RPR 3.3.0 does not seem to work on Ubuntu 20.04 with latest amdgpu drivers (21.40.1)

Issue

When I try to enable the addon, I get:

2021-11-15 14:04:34,493 INFO rpr.engine.init [140369307894272]: Core version: 2.2.7 build 0xdeae87c8 2021-11-15 14:04:34,493 - rpr.engine.init - INFO - Core version: 2.2.7 build 0xdeae87c8 2021-11-15 14:04:34,495 INFO rpr.engine.init [140369307894272]: RIF version: 1.7.1 build 0xfe53c43a 2021-11-15 14:04:34,495 - rpr.engine.init - INFO - RIF version: 1.7.1 build 0xfe53c43a Traceback (most recent call last): File "/home/dominik/bin/blender-2.93.4-linux-x64/2.93/scripts/modules/addon_utils.py", line 351, in enable mod = import(module_name) File "/home/dominik/.config/blender/2.93/scripts/addons/rprblender/init.py", line 51, in from .engine.viewport_engine import ViewportEngine File "/home/dominik/.config/blender/2.93/scripts/addons/rprblender/engine/viewport_engine.py", line 33, in from rprblender.utils import gl File "/home/dominik/.config/blender/2.93/scripts/addons/rprblender/utils/gl.py", line 25, in gl = cdll.LoadLibrary('libGL.so') File "/home/dominik/bin/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/ctypes/init.py", line 452, in LoadLibrary return self._dlltype(name) File "/home/dominik/bin/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: libGL.so: cannot open shared object file: No such file or directory

It used to work for me with previous GPU driver. The driver seems to be installed fine, the OpenCL device shows in Cycles settings. Even GPU rendering works with Cycles.

Steps to Reproduce

  1. start blender
  2. go to prefs, enable RPR

    System Setup (Environment)

    Ubuntu 20.04.3 LTS Radeon RX 6800, Ryzen 5800 Blender 2.93

dpospisil commented 3 years ago

clinfo output:

Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.2 AMD-APP (3361.0) Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd cl_amd_event_callback Platform Host timer resolution 1ns Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing Number of devices 1 Device Name gfx1030 Device Vendor Advanced Micro Devices, Inc. Device Vendor ID 0x1002 Device Version OpenCL 2.0 Driver Version 3361.0 (HSA1.1,LC) Device OpenCL C Version OpenCL C 2.0 Device Type GPU Device Board Name (AMD) AMD Radeon RX 6800 Device Topology (AMD) PCI-E, 08:00.0 Device Profile FULL_PROFILE Device Available Yes Compiler Available Yes Linker Available Yes Max compute units 30 SIMD per compute unit (AMD) 4 SIMD width (AMD) 32 SIMD instruction width (AMD) 1 Max clock frequency 2475MHz Graphics IP (AMD) 10.3 Device Partition (core) Max number of sub-devices 30 Supported partition types None Supported affinity domains (n/a) Max work item dimensions 3 Max work item sizes 1024x1024x1024 Max work group size 256 Preferred work group size (AMD) 256 Max work group size (AMD) 1024 Preferred work group size multiple 32 Wavefront width (AMD) 32 Preferred / native vector sizes
char 4 / 4
short 2 / 2
int 1 / 1
long 1 / 1
half 1 / 1 (cl_khr_fp16) float 1 / 1
double 1 / 1 (cl_khr_fp64) Half-precision Floating-point support (cl_khr_fp16) Denormals No Infinity and NANs No Round to nearest No Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Single-precision Floating-point support (core) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations Yes Double-precision Floating-point support (cl_khr_fp64) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Address bits 64, Little-Endian Global memory size 17163091968 (15.98GiB) Global free memory (AMD) 16760832 (15.98GiB) Global memory channels (AMD) 8 Global memory banks per channel (AMD) 4 Global memory bank width (AMD) 256 bytes Error Correction support No Max memory allocation 14588628168 (13.59GiB) Unified memory for Host and Device No Shared Virtual Memory (SVM) capabilities (core) Coarse-grained buffer sharing Yes Fine-grained buffer sharing Yes Fine-grained system sharing No Atomics No Minimum alignment for any data type 128 bytes Alignment of base address 1024 bits (128 bytes) Preferred alignment for atomics
SVM 0 bytes Global 0 bytes Local 0 bytes Max size for global variable 14588628168 (13.59GiB) Preferred total size of global vars 17163091968 (15.98GiB) Global Memory cache type Read/Write Global Memory cache size 16384 (16KiB) Global Memory cache line size 64 bytes Image support Yes Max number of samplers per kernel 29631 Max size for 1D images from buffer 134217728 pixels Max 1D or 2D image array size 8192 images Base address alignment for 2D image buffers 256 bytes Pitch alignment for 2D image buffers 256 pixels Max 2D image size 16384x16384 pixels Max 3D image size 16384x16384x8192 pixels Max number of read image args 128 Max number of write image args 8 Max number of read/write image args 64 Max number of pipe args 16 Max active pipe reservations 16 Max pipe packet size 1703726280 (1.587GiB) Local memory type Local Local memory size 65536 (64KiB) Local memory syze per CU (AMD) 65536 (64KiB) Local memory banks (AMD) 32 Max number of constant args 8 Max constant buffer size 14588628168 (13.59GiB) Preferred constant buffer size (AMD) 16384 (16KiB) Max size of kernel argument 1024 Queue properties (on host)
Out-of-order execution No Profiling Yes Queue properties (on device)
Out-of-order execution Yes Profiling Yes Preferred size 262144 (256KiB) Max size 8388608 (8MiB) Max queues on device 1 Max events on device 1024 Prefer user sync for interop Yes Number of P2P devices (AMD) 0 P2P devices (AMD) <printDeviceInfo:147: get number of CL_DEVICE_P2P_DEVICES_AMD : error -30> Profiling timer resolution 1ns Profiling timer offset since Epoch (AMD) 0ns (Thu Jan 1 01:00:00 1970) Execution capabilities
Run OpenCL kernels Yes Run native kernels No Thread trace supported (AMD) No Number of async queues (AMD) 8 Max real-time compute queues (AMD) 8 Max real-time compute units (AMD) 30 printf() buffer size 4194304 (4MiB) Built-in kernels (n/a) Device Extensions cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program

NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) AMD Accelerated Parallel Processing clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [AMD] clCreateContext(NULL, ...) [default] Success [AMD] clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx1030 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx1030 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx1030

ICD loader properties ICD loader Name OpenCL ICD Loader ICD loader Vendor OCL Icd free software ICD loader Version 2.2.11 ICD loader Profile OpenCL 2.1 NOTE: your OpenCL library only supports OpenCL 2.1, but some installed platforms support OpenCL 2.2. Programs using 2.2 features may crash or behave unexpectedly

dpospisil commented 2 years ago

I can now enable RPR - not sure what changed except regular apt-get update. The RPR works fine for final render, but does not work in viewport. The rendering seems to be happening as the GPU is occupied and I see all the data in statistics overlay, but there is no output in the viewport. Tried disabling/enabling denoising, GL interoperability, upscaling, all the same.

dpospisil commented 2 years ago

Can anyone please comment if this is a known issue or is something broken with my setup? I am still unable to get the viewport rendering to work. Funny fact is that if I start blender in software-gl mode, the viewport gpu RPR rendering works! However, blender is unusably slow...

dpospisil commented 2 years ago

The last amdgpu driver where viewport rendering works seems to be 21.20. Both 21.30 and 21.40 does not.

poisenbery commented 2 years ago

I am also having the same issue on a fresh linux install. I managed to get the plugin to enable by using a DEB installer instead of flatpak, but now everything turns 100% transparent in viewport and render. Nothing is visible.

AMD please help us linux users.

dpospisil commented 2 years ago

I am wondering if someone from AMD is watching this. Looks like Blender RPR on Linux is broken half a year and no one cares. Seems to me that AMD si fighting on too many fronts - open vs closed drivers, RPR, cycles HIP, hydra plugin... Might be better to focus on one working solution...

poisenbery commented 2 years ago

@dpospisil I'm going to try to install an early version of Ubuntu and see if I can get anything to work.

Their amdgpu driver script has a module that only allows installation on 3 specific distros. It makes no sense. I tried editing and even removing the module and it doesn't work without it.

EDIT: Blender crashes on enable of plugin on the "supported" version of Ubuntu, for both plugin and the amd driver.

Kind of upset, because I specifically bought this laptop to use the RPR in blender with Linux.

DagerD commented 2 years ago

I approve that we have such issue. We will try to fix it.

dpospisil commented 2 years ago

Thanks for confirmation.

bsavery commented 2 years ago

@DagerD Is this fixed with 3.4 version of plugin?

moacirrf commented 2 years ago

Same problem here. Maybe if the devs informs exactly the environment they test, would be good. 1- Drivers version, what driver is used 2- Opencl, Vulkan, opengl version etc 3- GPUS tested.