summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-07-15 19:45:36 +1000
committerStenzek <stenzek@gmail.com>2019-07-18 23:43:12 +1000
commit68bd4cd79a7f00214fd0a21127cab5edce7b4af4 (patch)
tree7db5436221b28a13b28460227ad02b5f18ab42bd /Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
parenta77b571da7a31fe30f35605a90d040325cb1e595 (diff)
Vulkan: Use reversed depth range in viewport
Also adds a DriverDetails bug to disable on drivers where this is still broken.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VulkanContext.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VulkanContext.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
index 1f0955c921..46ce571bd5 100644
--- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
@@ -272,6 +272,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
config->backend_info.bSupportsPostProcessing = true; // Assumed support.
config->backend_info.bSupportsBackgroundCompiling = true; // Assumed support.
config->backend_info.bSupportsCopyToVram = true; // Assumed support.
+ config->backend_info.bSupportsReversedDepthRange = true; // Assumed support.
config->backend_info.bSupportsDualSourceBlend = false; // Dependent on features.
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
@@ -283,8 +284,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
config->backend_info.bSupportsBPTCTextures = false; // Dependent on features.
config->backend_info.bSupportsLogicOp = false; // Dependent on features.
config->backend_info.bSupportsLargePoints = false; // Dependent on features.
- config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
- config->backend_info.bSupportsFramebufferFetch = false; // No support.
+ config->backend_info.bSupportsFramebufferFetch = false; // No support.
}
void VulkanContext::PopulateBackendInfoAdapters(VideoConfig* config, const GPUList& gpu_list)
@@ -340,6 +340,11 @@ void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalD
// Seems to be fine on GCN Gen 1-2, unconfirmed on GCN Gen 3, causes driver resets on GCN Gen 4.
if (DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVE_RESTART))
config->backend_info.bSupportsPrimitiveRestart = false;
+
+ // Reversed depth range is broken on some drivers, or is broken when used in combination
+ // with depth clamping. Fall back to inverted depth range for these.
+ if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_REVERSED_DEPTH_RANGE))
+ config->backend_info.bSupportsReversedDepthRange = false;
}
void VulkanContext::PopulateBackendInfoMultisampleModes(