diff options
Diffstat (limited to '')
-rw-r--r-- | src/common/fs/path_util.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 18 |
3 files changed, 20 insertions, 6 deletions
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 62318e70c..1074f2421 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -232,9 +232,7 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { fs::path GetExeDirectory() { wchar_t exe_path[MAX_PATH]; - GetModuleFileNameW(nullptr, exe_path, MAX_PATH); - - if (!exe_path) { + if (GetModuleFileNameW(nullptr, exe_path, MAX_PATH) == 0) { LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current process"); } diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index fd27581ce..ce6c853c1 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -784,8 +784,8 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs) }); } else { // Front face defines both faces - scheduler.Record([ref = regs.stencil_back_func_ref, write_mask = regs.stencil_back_mask, - test_mask = regs.stencil_back_func_mask](vk::CommandBuffer cmdbuf) { + scheduler.Record([ref = regs.stencil_front_func_ref, write_mask = regs.stencil_front_mask, + test_mask = regs.stencil_front_func_mask](vk::CommandBuffer cmdbuf) { cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref); cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask); cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask); diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 7b2ca8046..b3a77e07f 100644 --- 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. |