diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-08-25 03:22:41 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-08-25 03:22:41 +0200 |
commit | 4d535799eb8ae2b4c0f6acd13e84f914e55769a0 (patch) | |
tree | 779be2e39890eabd2f667b6d0107c5daebb6f95f /src/video_core/vulkan_common/vulkan_device.cpp | |
parent | Merge pull request #6878 from BreadFish64/optimize-GetHostThreadID (diff) | |
download | yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar.gz yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar.bz2 yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar.lz yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar.xz yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.tar.zst yuzu-4d535799eb8ae2b4c0f6acd13e84f914e55769a0.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 8e56a89e1..86ca4be54 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -368,18 +368,21 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, demote); - VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8; - if (is_float16_supported) { - float16_int8 = { + if (is_int8_supported || is_float16_supported) { + VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, .pNext = nullptr, - .shaderFloat16 = true, - .shaderInt8 = false, + .shaderFloat16 = is_float16_supported, + .shaderInt8 = is_int8_supported, }; SetNext(next, float16_int8); - } else { + } + if (!is_float16_supported) { LOG_INFO(Render_Vulkan, "Device doesn't support float16 natively"); } + if (!is_int8_supported) { + LOG_INFO(Render_Vulkan, "Device doesn't support int8 natively"); + } if (!nv_viewport_swizzle) { LOG_INFO(Render_Vulkan, "Device doesn't support viewport swizzles"); @@ -909,6 +912,7 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) { physical.GetFeatures2KHR(features); is_float16_supported = float16_int8_features.shaderFloat16; + is_int8_supported = float16_int8_features.shaderInt8; extensions.push_back(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME); } if (has_ext_subgroup_size_control) { |