Broken rendering in Forgotten Fields Demo
System information
System:
Host: zoe Kernel: 5.10.0-4-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1
Desktop: GNOME 3.38.3 tk: GTK 3.24.24 wm: gnome-shell dm: GDM3
Distro: Debian GNU/Linux bullseye/sid
CPU:
Info: Quad Core model: Intel Core i5-6600 bits: 64 type: MCP
arch: Skylake-S rev: 3 L2 cache: 6 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 26399
Speed: 2700 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 2700 2: 2700
3: 2700 4: 2700
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: XFX Pine driver: amdgpu v: kernel bus ID: 01:00.0
chip ID: 1002:67df
Display: x11 server: X.Org 1.20.10 compositor: gnome-shell driver:
loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa
resolution: 1920x1080~60Hz s-dpi: 100
OpenGL: renderer: Radeon RX 570 Series (POLARIS10 DRM 3.40.0
5.10.0-4-amd64 LLVM 11.0.1)
v: 4.6 Mesa 20.3.4 direct render: Yes
Describe the issue
The demo of the Unity game Forgotten Fields have some major rendering issues in OpenGL (see screenshot). Running the game in a debug context logs the following error:
Mesa: User error: GL_INVALID_VALUE in glUniform1i(invalid sampler/tex unit index for uniform 256)
The game does render correctly, and does not trigger the above error, if the OpenGL version is limited to 3.2. I presume this disables some features.
The rendering issues are the same with Mesa 20.3.4 and 21.0. Using git master (453a97b2) results in a segfault:
../src/gallium/winsys/amdgpu/drm/amdgpu_bo.c:654: get_slab_wasted_size: Assertion
bo->base.size <= bo->u.slab.entry.entry_size' failed.`
I'm guessing this is a Unity bug, but wanted to file a bug just to be sure.
Apitrace
apitrace (58MB)
Screenshots
OpenGL vs Vulkan rendering (with -force-vulkan):