Skip to content

Commit

Permalink
GS/Vulkan: Add env var for non-semantic debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Apr 13, 2024
1 parent ee07b71 commit 0700683
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,15 @@ bool GSDeviceVK::SelectDeviceExtensions(ExtensionList* extension_list, bool enab
m_optional_extensions.vk_ext_line_rasterization = SupportsExtension(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME,
require_line_rasterization);
m_optional_extensions.vk_khr_driver_properties = SupportsExtension(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, false);
m_optional_extensions.vk_khr_shader_non_semantic_info =
SupportsExtension(VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME, false);

// glslang generates debug info instructions before phi nodes at the beginning of blocks when non-semantic debug info
// is enabled, triggering errors by spirv-val. Gate it by an environment variable if you want source debugging until
// this is fixed.
if (const char* val = std::getenv("USE_NON_SEMANTIC_DEBUG_INFO"); val && StringUtil::FromChars<bool>(val).value_or(false))
{
m_optional_extensions.vk_khr_shader_non_semantic_info =
SupportsExtension(VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME, false);
}

#ifdef _WIN32
m_optional_extensions.vk_ext_full_screen_exclusive =
Expand Down

0 comments on commit 0700683

Please sign in to comment.