Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OpenGL Shader Compilation causes out-of-memory crashes on AMD (radeonsi) hardware #2396

Closed
Eonfge opened this issue Feb 5, 2024 · 1 comment
Labels

Comments

@Eonfge
Copy link

Eonfge commented Feb 5, 2024

GZDoom version

g4.11.3-m Flathub

Which game are you running with GZDoom?

Doom 2

What Operating System are you using?

Linux x86_64

Please describe your specific OS version

Fedora 39, Flathub

Relevant hardware info

System:
  Host: kevin-fedora-desktop Kernel: 6.6.14-200.fc39.x86_64 arch: x86_64
    bits: 64 compiler: gcc v: 2.40-13.fc39 Desktop: GNOME v: 45.3 tk: GTK
    v: 3.24.41 wm: gnome-shell dm: GDM Distro: Fedora release 39 (Thirty Nine)
CPU:
  Info: 8-core model: AMD Ryzen 7 2700 bits: 64 type: MT MCP arch: Zen+ rev: 2
    cache: L1: 768 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 3509 high: 3650 min/max: N/A cores: 1: 3650 2: 3650
    3: 3650 4: 3157 5: 3504 6: 3650 7: 3099 8: 3412 9: 3650 10: 3650 11: 3650
    12: 3404 13: 3650 14: 3650 15: 3073 16: 3650 bogomips: 116801
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-2 pcie: speed: 16 GT/s
    lanes: 16 ports: active: DP-1 empty: DP-2,HDMI-A-1,HDMI-A-2
    bus-ID: 28:00.0 chip-ID: 1002:73df
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.4
    compositor: gnome-shell driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
    display-ID: 0
  Monitor-1: DP-1 model: Dell U2515H res: 2560x1440 dpi: 118
    diag: 634mm (25")
  API: OpenGL v: 4.6 vendor: amd mesa v: 23.3.4 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: AMD Radeon RX 6700 XT (radeonsi navi22 LLVM
    17.0.6 DRM 3.54 6.6.14-200.fc39.x86_64) device-ID: 1002:73df
    display-ID: :0.0
  API: Vulkan v: 1.3.268 surfaces: xcb,xlib,wayland device: 0
    type: discrete-gpu driver: mesa radv device-ID: 1002:73df device: 1
    type: cpu driver: mesa llvmpipe device-ID: 10005:0000
  API: EGL Message: EGL data requires eglinfo. Check --recommends.

A clear and concise description of what the bug is.

See this discussion with the OpenGL driver team:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/9953

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Make sure you have an AMD Card
  2. Use the open-source OpenGL driver called radeonsi
  3. Start Doom 2 with OpenGL +vid_preferbackend 0
  4. Witness the OOM

Provide a Log

[kevin@kevin-fedora-desktop ~]$ flatpak run org.zdoom.GZDoom 
GZDoom g4.11.3-m - 2023-10-26 15:18:50 -0400 - SDL version
Compiled on Jan 31 2024

OS: Freedesktop SDK 23.08 (Flatpak runtime), Linux 6.6.14-200.fc39.x86_64 on x86_64
GZDoom version g4.11.3-m
W_Init: Init WADfiles.
adding /app/share/games/doom/gzdoom.pk3, 672 lumps
adding /app/share/games/doom/game_support.pk3, 3307 lumps
adding /home/kevin/.var/app/org.zdoom.GZDoom/.config/gzdoom/IWAD/DOOM2.WAD, 2919 lumps
adding /app/share/games/doom/lights.pk3, 7 lumps
adding /app/share/games/doom/brightmaps.pk3, 499 lumps
adding /app/share/games/doom/game_widescreen_gfx.pk3, 214 lumps
S_Init: Setting up sound.
I_InitSound: Initializing OpenAL
  Opened device Sirus Headset Analog Surround 4.1
  EFX enabled
I_Init: Setting up machine state.
CPU Vendor ID: AuthenticAMD
  Name: AMD Ryzen 7 2700 Eight-Core Processor 
  Family 23 (23), Model 8, Stepping 2
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
script parsing took 157.51 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver wayland
GL_VENDOR: AMD
GL_RENDERER: AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 17.0.6, DRM 3.54, 6.6.14-200.fc39.x86_64)
GL_VERSION: 4.6 (Core Profile) Mesa 23.3.4 (git-27405fd573) (Core profile)
GL_SHADING_LANGUAGE_VERSION: 4.60

Max. texture size: 16384
Max. texture units: 32
Max. varying: 128
Max. combined shader storage blocks: 80
Max. vertex shader storage blocks: 16
Resolution: 2560 x 1440

Discussion

It's not entirly clear if this is an oversight in the OpenGL driver that needs to be fixed upsteam, or if there is something that GZDoom could do better with its handling of OpenGL Shaders.

@Eonfge Eonfge added the bug label Feb 5, 2024
@Eonfge
Copy link
Author

Eonfge commented Feb 5, 2024

Damn, guess this is a duplicate of #2223 Didn't find it because it made no reverence to radeaonsi or opengl in the original title.

@Eonfge Eonfge closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant