From e3f069815f42e61d51a1dc4f8b180d7e39fbf5c4 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 25 May 2022 08:48:24 +0200 Subject: [PATCH] early-access version 2734 --- README.md | 2 +- .../vulkan_common/vulkan_device.cpp | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7861617ba..fb54d8909 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2733. +This is the source code for early-access 2734. ## Legal Notice diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 5b688576b..b3a77e07f 100755 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -566,7 +566,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroup_layout; - if (khr_workgroup_memory_explicit_layout) { + if (khr_workgroup_memory_explicit_layout && is_shader_int16_supported) { workgroup_layout = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR, @@ -577,6 +577,11 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR .workgroupMemoryExplicitLayout16BitAccess = VK_TRUE, }; SetNext(next, workgroup_layout); + } else if (khr_workgroup_memory_explicit_layout) { + // TODO(lat9nq): Find a proper fix for this + LOG_WARNING(Render_Vulkan, "Disabling VK_KHR_workgroup_memory_explicit_layout due to a " + "yuzu bug when host driver does not support 16-bit integers"); + khr_workgroup_memory_explicit_layout = false; } VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR executable_properties; @@ -664,6 +669,17 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR const bool is_amd = driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE; if (is_amd) { + // TODO(lat9nq): Add an upper bound when AMD fixes their VK_KHR_push_descriptor + const bool has_broken_push_descriptor = VK_VERSION_MAJOR(properties.driverVersion) == 2 && + VK_VERSION_MINOR(properties.driverVersion) == 0 && + VK_VERSION_PATCH(properties.driverVersion) >= 226; + if (khr_push_descriptor && has_broken_push_descriptor) { + LOG_WARNING( + Render_Vulkan, + "Disabling AMD driver 2.0.226 and later from broken VK_KHR_push_descriptor"); + khr_push_descriptor = false; + } + // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2. sets_per_pool = 96; // Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken. @@ -683,12 +699,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR ext_sampler_filter_minmax = false; } } - if (khr_workgroup_memory_explicit_layout && !is_shader_int16_supported) { - // TODO(lat9nq): Find a proper fix for this - LOG_WARNING(Render_Vulkan, "Disabling VK_KHR_workgroup_memory_explicit_layout due to a " - "yuzu bug when host driver does not support 16-bit integers"); - khr_workgroup_memory_explicit_layout = false; - } const bool is_intel_windows = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS; const bool is_intel_anv = driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA;