summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorAmeer J <52414509+ameerj@users.noreply.github.com>2021-10-24 00:02:23 +0200
committerGitHub <noreply@github.com>2021-10-24 00:02:23 +0200
commit494e34af6a247ebe18baaa237d6aab547feb3fba (patch)
tree60c61302d9ffc00b398ce6fbb53b7b74bbe17d51 /src/video_core/vulkan_common
parentMerge pull request #7217 from yuzu-emu/revert-6515-gc_thread_safe (diff)
parentVulran Rasterizer: address feedback. (diff)
downloadyuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.gz
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.bz2
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.lz
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.xz
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.tar.zst
yuzu-494e34af6a247ebe18baaa237d6aab547feb3fba.zip
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp4
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h5
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
is_float16_supported = false;
}
+ supports_d24_depth =
+ IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT,
+ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, FormatType::Optimal);
+
graphics_queue = logical.GetQueue(graphics_family);
present_queue = logical.GetQueue(present_family);
}
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:
return sets_per_pool;
}
+ bool SupportsD24DepthBuffer() const {
+ return supports_d24_depth;
+ }
+
private:
/// Checks if the physical device is suitable.
void CheckSuitability(bool requires_swapchain) const;
@@ -425,6 +429,7 @@ private:
bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit
bool has_renderdoc{}; ///< Has RenderDoc attached
bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
+ bool supports_d24_depth{}; ///< Supports D24 depth buffers.
// Telemetry parameters
std::string vendor_name; ///< Device's driver name.