mirror of https://github.com/PCSX2/pcsx2.git
GS/D3D: Default to D3D11 for Intel
This commit is contained in:
parent
49f2900e1f
commit
faf36ecba6
|
@ -156,14 +156,19 @@ GSRendererType GSUtil::GetPreferredRenderer()
|
||||||
// Mac: Prefer Metal hardware.
|
// Mac: Prefer Metal hardware.
|
||||||
return GSRendererType::Metal;
|
return GSRendererType::Metal;
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
if (D3D::ShouldPreferRenderer() == D3D::Renderer::Vulkan)
|
const u8 preferred = D3D::ShouldPreferRenderer();
|
||||||
|
#if defined(ENABLE_VULKAN)
|
||||||
|
if (preferred == D3D::Renderer::Vulkan)
|
||||||
return GSRendererType::VK;
|
return GSRendererType::VK;
|
||||||
|
#endif
|
||||||
#if defined(ENABLE_OPENGL)
|
#if defined(ENABLE_OPENGL)
|
||||||
else if (D3D::ShouldPreferRenderer() == D3D::Renderer::OpenGL)
|
if (preferred == D3D::Renderer::OpenGL)
|
||||||
return GSRendererType::OGL;
|
return GSRendererType::OGL;
|
||||||
#endif
|
#endif
|
||||||
else
|
if (preferred == D3D::Renderer::Direct3D12)
|
||||||
return GSRendererType::DX11;
|
return GSRendererType::DX12;
|
||||||
|
|
||||||
|
return GSRendererType::DX11;
|
||||||
#else
|
#else
|
||||||
// Linux: Prefer GL/Vulkan, whatever is available.
|
// Linux: Prefer GL/Vulkan, whatever is available.
|
||||||
#if defined(ENABLE_OPENGL)
|
#if defined(ENABLE_OPENGL)
|
||||||
|
|
|
@ -174,22 +174,37 @@ namespace D3D
|
||||||
switch (Vendor())
|
switch (Vendor())
|
||||||
{
|
{
|
||||||
case VendorID::Nvidia:
|
case VendorID::Nvidia:
|
||||||
|
{
|
||||||
if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
||||||
return Renderer::Vulkan;
|
return Renderer::Vulkan;
|
||||||
else if (feature_level == D3D_FEATURE_LEVEL_11_0)
|
else if (feature_level == D3D_FEATURE_LEVEL_11_0)
|
||||||
return Renderer::OpenGL;
|
return Renderer::OpenGL;
|
||||||
[[fallthrough]];
|
else
|
||||||
|
return Renderer::Direct3D11;
|
||||||
|
}
|
||||||
|
|
||||||
case VendorID::AMD:
|
case VendorID::AMD:
|
||||||
|
{
|
||||||
if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
||||||
return Renderer::Vulkan;
|
return Renderer::Vulkan;
|
||||||
[[fallthrough]];
|
else
|
||||||
|
return Renderer::Direct3D11;
|
||||||
|
}
|
||||||
|
|
||||||
case VendorID::Intel:
|
case VendorID::Intel:
|
||||||
if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
{
|
||||||
return Renderer::OpenGL;
|
// Older Intel GPUs prior to Xe seem to have broken OpenGL drivers which choke
|
||||||
[[fallthrough]];
|
// on some of our shaders, causing what appears to be GPU timeouts+device removals.
|
||||||
|
// Vulkan has broken barriers, also prior to Xe. So just fall back to DX11 everywhere,
|
||||||
|
// unless we can find some way of differentiating Xe.
|
||||||
|
return Renderer::Direct3D11;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
// Default is D3D11
|
// Default is D3D11
|
||||||
return Renderer::Default;
|
return Renderer::Direct3D11;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue