diff options
| author | 2022-05-19 20:05:37 -0400 | |
|---|---|---|
| committer | 2022-05-25 01:22:15 -0400 | |
| commit | 3a8c2ae328a03c3d71209e371ea6f3b2fe5de251 (patch) | |
| tree | 75dd60dd43f350a3df9716aa6e4bd74b143e09ec /src/video_core/vulkan_common | |
| parent | Merge pull request #8351 from abouvier/patch-2 (diff) | |
| download | yuzu-3a8c2ae328a03c3d71209e371ea6f3b2fe5de251.tar.gz yuzu-3a8c2ae328a03c3d71209e371ea6f3b2fe5de251.tar.xz yuzu-3a8c2ae328a03c3d71209e371ea6f3b2fe5de251.zip | |
vulkan_device: Workaround extension bug
A bug occurs in yuzu when VK_KHR_workgroup_memory_explicit_layout is
available but 16-bit integers are not supported in the host driver.
Disable usage of the extension when this case arises.
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 7b2ca8046..58d0c6a93 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; |