diff options
| author | 2021-01-16 20:39:06 -0300 | |
|---|---|---|
| committer | 2021-02-13 02:16:21 -0300 | |
| commit | 40ed0cb92065ed13825e5830c26c918fe758d6d6 (patch) | |
| tree | 92bfdb889be1e4c73f396cdc9cbb37599f2f7505 /src/video_core | |
| parent | vulkan_device: Use designated initializers for features (diff) | |
| download | yuzu-40ed0cb92065ed13825e5830c26c918fe758d6d6.tar.gz yuzu-40ed0cb92065ed13825e5830c26c918fe758d6d6.tar.xz yuzu-40ed0cb92065ed13825e5830c26c918fe758d6d6.zip | |
vulkan_device: Enable robust buffers
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index ec9cd5b34..a1dd406fb 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -379,7 +379,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 379 | robustness2 = { | 379 | robustness2 = { |
| 380 | .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, | 380 | .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, |
| 381 | .pNext = nullptr, | 381 | .pNext = nullptr, |
| 382 | .robustBufferAccess2 = false, | 382 | .robustBufferAccess2 = true, |
| 383 | .robustImageAccess2 = true, | 383 | .robustImageAccess2 = true, |
| 384 | .nullDescriptor = true, | 384 | .nullDescriptor = true, |
| 385 | }; | 385 | }; |
| @@ -570,6 +570,7 @@ void Device::CheckSuitability() const { | |||
| 570 | const VkPhysicalDeviceFeatures features{physical.GetFeatures()}; | 570 | const VkPhysicalDeviceFeatures features{physical.GetFeatures()}; |
| 571 | const std::array feature_report{ | 571 | const std::array feature_report{ |
| 572 | std::make_pair(features.vertexPipelineStoresAndAtomics, "vertexPipelineStoresAndAtomics"), | 572 | std::make_pair(features.vertexPipelineStoresAndAtomics, "vertexPipelineStoresAndAtomics"), |
| 573 | std::make_pair(features.robustBufferAccess, "robustBufferAccess"), | ||
| 573 | std::make_pair(features.imageCubeArray, "imageCubeArray"), | 574 | std::make_pair(features.imageCubeArray, "imageCubeArray"), |
| 574 | std::make_pair(features.independentBlend, "independentBlend"), | 575 | std::make_pair(features.independentBlend, "independentBlend"), |
| 575 | std::make_pair(features.depthClamp, "depthClamp"), | 576 | std::make_pair(features.depthClamp, "depthClamp"), |
| @@ -738,7 +739,8 @@ std::vector<const char*> Device::LoadExtensions() { | |||
| 738 | robustness2.pNext = nullptr; | 739 | robustness2.pNext = nullptr; |
| 739 | features.pNext = &robustness2; | 740 | features.pNext = &robustness2; |
| 740 | physical.GetFeatures2KHR(features); | 741 | physical.GetFeatures2KHR(features); |
| 741 | if (robustness2.nullDescriptor && robustness2.robustImageAccess2) { | 742 | if (robustness2.nullDescriptor && robustness2.robustBufferAccess2 && |
| 743 | robustness2.robustImageAccess2) { | ||
| 742 | extensions.push_back(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME); | 744 | extensions.push_back(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME); |
| 743 | ext_robustness2 = true; | 745 | ext_robustness2 = true; |
| 744 | } | 746 | } |