diff options
| author | 2021-09-23 03:14:10 +0200 | |
|---|---|---|
| committer | 2021-09-23 03:49:10 +0200 | |
| commit | 60a39805615fb0480eb57416f5e9ec17e7c91ce4 (patch) | |
| tree | 8f49ff1df003f24de667163d70132def81b665cb /src/video_core/vulkan_common | |
| parent | Merge pull request #7003 from ameerj/unlocked-present-mode (diff) | |
| download | yuzu-60a39805615fb0480eb57416f5e9ec17e7c91ce4.tar.gz yuzu-60a39805615fb0480eb57416f5e9ec17e7c91ce4.tar.xz yuzu-60a39805615fb0480eb57416f5e9ec17e7c91ce4.zip | |
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 c2ec9f76a..3a048900b 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -618,6 +618,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 618 | is_float16_supported = false; | 618 | is_float16_supported = false; |
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | supports_d24_depth = | ||
| 622 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, | ||
| 623 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal); | ||
| 624 | |||
| 621 | graphics_queue = logical.GetQueue(graphics_family); | 625 | graphics_queue = logical.GetQueue(graphics_family); |
| 622 | present_queue = logical.GetQueue(present_family); | 626 | present_queue = logical.GetQueue(present_family); |
| 623 | } | 627 | } |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index bc180a32a..f14e4001e 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -327,6 +327,10 @@ public: | |||
| 327 | return sets_per_pool; | 327 | return sets_per_pool; |
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | bool SupportsD24DepthBuffer() const { | ||
| 331 | return supports_d24_depth; | ||
| 332 | } | ||
| 333 | |||
| 330 | private: | 334 | private: |
| 331 | /// Checks if the physical device is suitable. | 335 | /// Checks if the physical device is suitable. |
| 332 | void CheckSuitability(bool requires_swapchain) const; | 336 | void CheckSuitability(bool requires_swapchain) const; |
| @@ -419,6 +423,7 @@ private: | |||
| 419 | bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config. | 423 | bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config. |
| 420 | bool has_renderdoc{}; ///< Has RenderDoc attached | 424 | bool has_renderdoc{}; ///< Has RenderDoc attached |
| 421 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached | 425 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached |
| 426 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. | ||
| 422 | 427 | ||
| 423 | // Telemetry parameters | 428 | // Telemetry parameters |
| 424 | std::string vendor_name; ///< Device's driver name. | 429 | std::string vendor_name; ///< Device's driver name. |