GS/Vulkan: Gate non semantic debug info behind extension

This commit is contained in:
Stenzek 2024-04-12 21:59:59 +10:00 committed by Connor McLaughlin
parent 1cd4ba2698
commit fbfdf1200d
3 changed files with 7 additions and 1 deletions

View File

@ -380,6 +380,8 @@ 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);
#ifdef _WIN32
m_optional_extensions.vk_ext_full_screen_exclusive =

View File

@ -43,6 +43,7 @@ public:
bool vk_ext_full_screen_exclusive : 1;
bool vk_ext_line_rasterization : 1;
bool vk_khr_driver_properties : 1;
bool vk_khr_shader_non_semantic_info : 1;
};
// Global state accessors

View File

@ -111,8 +111,11 @@ std::optional<VKShaderCache::SPIRVCodeVector> VKShaderCache::CompileShaderToSPV(
if (debug)
{
options.SetOptimizationLevel(shaderc_optimization_level_zero);
options.SetGenerateDebugInfo();
if (GSDeviceVK::GetInstance()->GetOptionalExtensions().vk_khr_shader_non_semantic_info)
options.SetEmitNonSemanticDebugInfo();
options.SetOptimizationLevel(shaderc_optimization_level_zero);
}
else
{