ValveSoftware / Fossilize

A serialization format for various persistent Vulkan object types.
MIT License
561 stars 46 forks source link

Shader compilation freezes the system #218

Open koresh-krasa opened 1 year ago

koresh-krasa commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

On a laptop if steam is launched with dGPU from gnome application launcher or with switcherooctl shader compilation takes more cpu and ram to compile shaders (This can cause whole system to freeze). If steam is started with DRI_PRIME=1 than shader compilation is almost instant and uses little resources.

Steps for reproducing this issue:

  1. start steam with DRI_PRIME=1
  2. run shader_prune
  3. start the game
  4. start steam with switcherooctl dGPU option (DRI_PRIME=pci-0000_03_00_0 for example)
  5. run shader_prune
  6. start the game

On step 3 shader compilation is quick On step 6 shader compilation can freeze the system

System info ``` Processor Information: CPU Vendor: AuthenticAMD CPU Brand: AMD Ryzen 9 5900HX with Radeon Graphics CPU Family: 0x19 CPU Model: 0x50 CPU Stepping: 0x0 CPU Type: 0x0 Speed: 4888 Mhz 16 logical processors 8 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Supported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Supported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: Freedesktop.org SDK 22.08 (Flatpak runtime) (64 bit) Kernel Name: Linux Kernel Version: 6.1.11-200.fc37.x86_64 X Server Vendor: The X.Org Foundation X Server Release: 12201008 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime_0.20221019.0 Video Card: Driver: AMD AMD Radeon RX 6800M (navi22, LLVM 15.0.7, DRM 3.49, 6.1.11-200.fc37.x86_64) Driver Version: 4.6 (Compatibility Profile) Mesa 22.3.4 (git-a5ffb70f86) OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 59 Hz VendorID: 0x1002 DeviceID: 0x1638 Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 2560 x 1440 Desktop Resolution: 4480 x 1440 Primary Display Size: 13.39" x 7.48" (15.31" diag) 34.0cm x 19.0cm (38.9cm diag) Primary VRAM: 12288 MB ```