Merge pull request #7070 from FernandoS27/want-you-bad

Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.
This commit is contained in:
Ameer J 2021-10-23 18:02:23 -04:00 committed by GitHub
commit 494e34af6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 3 deletions

View file

@ -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);
}

View file

@ -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.