vk: Improve AMD driver support

- Workaround broken fp16 in AMDVLK/RADV
- Do not disable primitive restart as the issue seems to have been fixed
This commit is contained in:
kd-11 2019-07-08 21:46:09 +03:00 committed by kd-11
parent 956270d9be
commit 2548057ea0
2 changed files with 9 additions and 14 deletions

View file

@ -309,21 +309,8 @@ namespace vk
switch (g_driver_vendor = g_current_renderer->gpu().get_driver_vendor())
{
case driver_vendor::AMD:
// Radeon proprietary driver does not properly handle fence reset and can segfault during vkResetFences
// Disable fence reset for proprietary driver and delete+initialize a new fence instead
g_drv_disable_fence_reset = true;
// Fall through
case driver_vendor::RADV:
// Radeon fails to properly handle degenerate primitives if primitive restart is enabled
// One has to choose between using degenerate primitives or primitive restart to break up lists but not both
// Polaris and newer will crash with ERROR_DEVICE_LOST
// Older GCN will work okay most of the time but also occasionally draws garbage without reason (proprietary driver only)
if (g_driver_vendor == driver_vendor::AMD ||
gpu_name.find("VEGA") != std::string::npos ||
gpu_name.find("POLARIS") != std::string::npos)
{
g_drv_no_primitive_restart_flag = !g_cfg.video.vk.force_primitive_restart;
}
// Previous bugs with fence reset and primitive restart seem to have been fixed with newer drivers
break;
case driver_vendor::NVIDIA:
// Nvidia cards are easily susceptible to NaN poisoning

View file

@ -541,6 +541,14 @@ private:
// See https://bugs.freedesktop.org/show_bug.cgi?id=110970
LOG_FATAL(RSX, "RADV drivers have a major driver bug with LLVM 8 resulting in no visual output. Upgrade to LLVM 9 version of mesa to avoid this issue.");
}
#ifndef _WIN32
if (get_name().find("VEGA"))
{
LOG_WARNING(RSX, "float16_t does not work correctly on VEGA hardware for both RADV and AMDVLK. Using float32_t fallback instead.");
shader_types_support.allow_float16 = false;
}
#endif
}
std::string get_name() const