diff options
| author | 2021-10-23 18:02:23 -0400 | |
|---|---|---|
| committer | 2021-10-23 18:02:23 -0400 | |
| commit | 494e34af6a247ebe18baaa237d6aab547feb3fba (patch) | |
| tree | 60c61302d9ffc00b398ce6fbb53b7b74bbe17d51 /src/video_core/vulkan_common | |
| parent | Merge pull request #7217 from yuzu-emu/revert-6515-gc_thread_safe (diff) | |
| parent | Vulran Rasterizer: address feedback. (diff) | |
| download | yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.gz yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.xz yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.zip | |
Merge pull request #7070 from FernandoS27/want-you-bad
Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 6388ed2eb..0f807990c 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -623,6 +623,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 623 | is_float16_supported = false; | 623 | is_float16_supported = false; |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | supports_d24_depth = | ||
| 627 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, | ||
| 628 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal); | ||
| 629 | |||
| 626 | graphics_queue = logical.GetQueue(graphics_family); | 630 | graphics_queue = logical.GetQueue(graphics_family); |
| 627 | present_queue = logical.GetQueue(present_family); | 631 | present_queue = logical.GetQueue(present_family); |
| 628 | } | 632 | } |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index d9e74f1aa..2d5daf6cd 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -332,6 +332,10 @@ public: | |||
| 332 | return sets_per_pool; | 332 | return sets_per_pool; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | bool SupportsD24DepthBuffer() const { | ||
| 336 | return supports_d24_depth; | ||
| 337 | } | ||
| 338 | |||
| 335 | private: | 339 | private: |
| 336 | /// Checks if the physical device is suitable. | 340 | /// Checks if the physical device is suitable. |
| 337 | void CheckSuitability(bool requires_swapchain) const; | 341 | void CheckSuitability(bool requires_swapchain) const; |
| @@ -425,6 +429,7 @@ private: | |||
| 425 | bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit | 429 | bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit |
| 426 | bool has_renderdoc{}; ///< Has RenderDoc attached | 430 | bool has_renderdoc{}; ///< Has RenderDoc attached |
| 427 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached | 431 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached |
| 432 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. | ||
| 428 | 433 | ||
| 429 | // Telemetry parameters | 434 | // Telemetry parameters |
| 430 | std::string vendor_name; ///< Device's driver name. | 435 | std::string vendor_name; ///< Device's driver name. |