diff options
| author | 2021-05-30 20:43:47 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:34 -0400 | |
| commit | 77372443c3d6b20d7f78366bb4aa162f22bd7cde (patch) | |
| tree | 8e4bbd2cabc498d9547c99916a901c34f606ee8c /src/video_core/vulkan_common | |
| parent | vk_buffer_cache: Add transform feedback usage to buffers (diff) | |
| download | yuzu-77372443c3d6b20d7f78366bb4aa162f22bd7cde.tar.gz yuzu-77372443c3d6b20d7f78366bb4aa162f22bd7cde.tar.xz yuzu-77372443c3d6b20d7f78366bb4aa162f22bd7cde.zip | |
vulkan: Enable depth bounds and use it conditionally
Intel devices pre-Xe don't support this.
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index aabcb0b10..0a42efb6a 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -226,7 +226,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 226 | .depthClamp = true, | 226 | .depthClamp = true, |
| 227 | .depthBiasClamp = true, | 227 | .depthBiasClamp = true, |
| 228 | .fillModeNonSolid = true, | 228 | .fillModeNonSolid = true, |
| 229 | .depthBounds = false, | 229 | .depthBounds = is_depth_bounds_supported, |
| 230 | .wideLines = false, | 230 | .wideLines = false, |
| 231 | .largePoints = true, | 231 | .largePoints = true, |
| 232 | .alphaToOne = false, | 232 | .alphaToOne = false, |
| @@ -908,6 +908,7 @@ void Device::SetupFamilies(VkSurfaceKHR surface) { | |||
| 908 | 908 | ||
| 909 | void Device::SetupFeatures() { | 909 | void Device::SetupFeatures() { |
| 910 | const VkPhysicalDeviceFeatures features{physical.GetFeatures()}; | 910 | const VkPhysicalDeviceFeatures features{physical.GetFeatures()}; |
| 911 | is_depth_bounds_supported = features.depthBounds; | ||
| 911 | is_formatless_image_load_supported = features.shaderStorageImageReadWithoutFormat; | 912 | is_formatless_image_load_supported = features.shaderStorageImageReadWithoutFormat; |
| 912 | is_shader_float64_supported = features.shaderFloat64; | 913 | is_shader_float64_supported = features.shaderFloat64; |
| 913 | is_shader_int64_supported = features.shaderInt64; | 914 | is_shader_int64_supported = features.shaderInt64; |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 693419505..1ab63ecd7 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -159,6 +159,11 @@ public: | |||
| 159 | return is_formatless_image_load_supported; | 159 | return is_formatless_image_load_supported; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | // Returns true if depth bounds is supported. | ||
| 163 | bool IsDepthBoundsSupported() const { | ||
| 164 | return is_depth_bounds_supported; | ||
| 165 | } | ||
| 166 | |||
| 162 | /// Returns true when blitting from and to depth stencil images is supported. | 167 | /// Returns true when blitting from and to depth stencil images is supported. |
| 163 | bool IsBlitDepthStencilSupported() const { | 168 | bool IsBlitDepthStencilSupported() const { |
| 164 | return is_blit_depth_stencil_supported; | 169 | return is_blit_depth_stencil_supported; |
| @@ -314,6 +319,7 @@ private: | |||
| 314 | bool is_float16_supported{}; ///< Support for float16 arithmetics. | 319 | bool is_float16_supported{}; ///< Support for float16 arithmetics. |
| 315 | bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest. | 320 | bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest. |
| 316 | bool is_formatless_image_load_supported{}; ///< Support for shader image read without format. | 321 | bool is_formatless_image_load_supported{}; ///< Support for shader image read without format. |
| 322 | bool is_depth_bounds_supported{}; ///< Support for depth bounds. | ||
| 317 | bool is_shader_float64_supported{}; ///< Support for float64. | 323 | bool is_shader_float64_supported{}; ///< Support for float64. |
| 318 | bool is_shader_int64_supported{}; ///< Support for int64. | 324 | bool is_shader_int64_supported{}; ///< Support for int64. |
| 319 | bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images. | 325 | bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images. |