summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/fs/path_util.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp4
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp18
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) {
232fs::path GetExeDirectory() { 232fs::path GetExeDirectory() {
233 wchar_t exe_path[MAX_PATH]; 233 wchar_t exe_path[MAX_PATH];
234 234
235 GetModuleFileNameW(nullptr, exe_path, MAX_PATH); 235 if (GetModuleFileNameW(nullptr, exe_path, MAX_PATH) == 0) {
236
237 if (!exe_path) {
238 LOG_ERROR(Common_Filesystem, 236 LOG_ERROR(Common_Filesystem,
239 "Failed to get the path to the executable of the current process"); 237 "Failed to get the path to the executable of the current process");
240 } 238 }
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)
784 }); 784 });
785 } else { 785 } else {
786 // Front face defines both faces 786 // Front face defines both faces
787 scheduler.Record([ref = regs.stencil_back_func_ref, write_mask = regs.stencil_back_mask, 787 scheduler.Record([ref = regs.stencil_front_func_ref, write_mask = regs.stencil_front_mask,
788 test_mask = regs.stencil_back_func_mask](vk::CommandBuffer cmdbuf) { 788 test_mask = regs.stencil_front_func_mask](vk::CommandBuffer cmdbuf) {
789 cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref); 789 cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref);
790 cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask); 790 cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask);
791 cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask); 791 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
566 } 566 }
567 567
568 VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroup_layout; 568 VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR workgroup_layout;
569 if (khr_workgroup_memory_explicit_layout) { 569 if (khr_workgroup_memory_explicit_layout && is_shader_int16_supported) {
570 workgroup_layout = { 570 workgroup_layout = {
571 .sType = 571 .sType =
572 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR, 572 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR,
@@ -577,6 +577,11 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
577 .workgroupMemoryExplicitLayout16BitAccess = VK_TRUE, 577 .workgroupMemoryExplicitLayout16BitAccess = VK_TRUE,
578 }; 578 };
579 SetNext(next, workgroup_layout); 579 SetNext(next, workgroup_layout);
580 } else if (khr_workgroup_memory_explicit_layout) {
581 // TODO(lat9nq): Find a proper fix for this
582 LOG_WARNING(Render_Vulkan, "Disabling VK_KHR_workgroup_memory_explicit_layout due to a "
583 "yuzu bug when host driver does not support 16-bit integers");
584 khr_workgroup_memory_explicit_layout = false;
580 } 585 }
581 586
582 VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR executable_properties; 587 VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR executable_properties;
@@ -664,6 +669,17 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
664 const bool is_amd = 669 const bool is_amd =
665 driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE; 670 driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
666 if (is_amd) { 671 if (is_amd) {
672 // TODO(lat9nq): Add an upper bound when AMD fixes their VK_KHR_push_descriptor
673 const bool has_broken_push_descriptor = VK_VERSION_MAJOR(properties.driverVersion) == 2 &&
674 VK_VERSION_MINOR(properties.driverVersion) == 0 &&
675 VK_VERSION_PATCH(properties.driverVersion) >= 226;
676 if (khr_push_descriptor && has_broken_push_descriptor) {
677 LOG_WARNING(
678 Render_Vulkan,
679 "Disabling AMD driver 2.0.226 and later from broken VK_KHR_push_descriptor");
680 khr_push_descriptor = false;
681 }
682
667 // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2. 683 // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2.
668 sets_per_pool = 96; 684 sets_per_pool = 96;
669 // Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken. 685 // Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken.