mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #680] [MERGED] (libretro/Vulkan) Fix glslang shader-related crashes #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/680
Author: @jdgleaver
Created: 8/1/2020
Status: ✅ Merged
Merged: 8/1/2020
Merged by: @stenzek
Base:
master← Head:libretro-vulkan-fix📝 Commits (1)
363804c(libretro/Vulkan) Fix glslang shader-related crashes📊 Changes
7 files changed (+28 additions, -1 deletions)
View changed files
📝
dep/glslang/OGLCompilersDLL/InitializeDll.cpp(+1 -0)📝
dep/glslang/glslang/Include/InitializeGlobals.h(+1 -0)📝
dep/glslang/glslang/MachineIndependent/PoolAlloc.cpp(+9 -0)📝
dep/glslang/glslang/MachineIndependent/ShaderLang.cpp(+1 -0)📝
src/common/vulkan/shader_compiler.cpp(+13 -1)📝
src/common/vulkan/shader_compiler.h(+2 -0)📝
src/duckstation-libretro/libretro_vulkan_host_display.cpp(+1 -0)📄 Description
As reported in #672, the libretro core crashes when loading more than one item of content within a single session when running under Linux with an Intel integrated GPU.
There were actually 2 issues here:
glslang::FinalizeProcess()is attached viastd::atexit(). This does not work as intended when running duckstation as a dynamic shared object library... (it only gets called when RetroArch quits, not when the core is unloaded)With Linux + Intel iGPU, I was getting hit by the same 'mysterious' corruption issue that affected RetroArch itself some time ago, and which was fixed in this commit:
4437cd1eacThis PR ensures that
glslang::FinalizeProcess()is called when unloading the core (and not on RetroArch exit), and backports the changes in4437cd1eac. This fixes all crashing issues on my systems.This closes #672
@stenzek I am by no means an expert in this particular area, so please review this carefully before merging! :)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.