mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Vulkan: Use VK_NV_glsl extension where available, and skip glslang
This commit is contained in:
@ -403,7 +403,8 @@ bool VulkanContext::SelectDeviceExtensions(ExtensionList* extension_list, bool e
|
||||
for (const auto& extension_properties : available_extension_list)
|
||||
INFO_LOG(VIDEO, "Available extension: %s", extension_properties.extensionName);
|
||||
|
||||
auto CheckForExtension = [&](const char* name, bool required) -> bool {
|
||||
auto CheckForExtension = [&](const char* name, bool required,
|
||||
bool* has_extension = nullptr) -> bool {
|
||||
if (std::find_if(available_extension_list.begin(), available_extension_list.end(),
|
||||
[&](const VkExtensionProperties& properties) {
|
||||
return !strcmp(name, properties.extensionName);
|
||||
@ -411,9 +412,14 @@ bool VulkanContext::SelectDeviceExtensions(ExtensionList* extension_list, bool e
|
||||
{
|
||||
INFO_LOG(VIDEO, "Enabling extension: %s", name);
|
||||
extension_list->push_back(name);
|
||||
if (has_extension)
|
||||
*has_extension = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (has_extension)
|
||||
*has_extension = false;
|
||||
|
||||
if (required)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Vulkan: Missing required extension %s.", name);
|
||||
@ -426,6 +432,7 @@ bool VulkanContext::SelectDeviceExtensions(ExtensionList* extension_list, bool e
|
||||
if (enable_surface && !CheckForExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME, true))
|
||||
return false;
|
||||
|
||||
CheckForExtension(VK_NV_GLSL_SHADER_EXTENSION_NAME, false, &m_supports_nv_glsl_extension);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user