Bump ANGLE, add ES3OnFL10_0 support (#2834)

This commit is contained in:
Pieter-Jan Briers
2022-05-18 23:55:36 +02:00
committed by GitHub
parent df09bc2cf0
commit f90526be22
4 changed files with 26 additions and 1 deletions

View File

@@ -95,6 +95,11 @@ namespace Robust.Client.Graphics.Clyde
private bool InitWindowing()
{
if (OperatingSystem.IsWindows() && _cfg.GetCVar(CVars.DisplayAngleEs3On10_0))
{
Environment.SetEnvironmentVariable("ANGLE_FEATURE_OVERRIDES_ENABLED", "allowES3OnFL10_0");
}
var iconPath = _cfg.GetCVar(CVars.DisplayWindowIconSet);
if (!string.IsNullOrWhiteSpace(iconPath))
_windowIconPath = new ResourcePath(iconPath);

View File

@@ -374,6 +374,14 @@ namespace Robust.Client.Graphics.Clyde
};
}
if (Clyde._cfg.GetCVar(CVars.DisplayAngleForce10_0))
{
featureLevels = stackalloc D3D_FEATURE_LEVEL[]
{
D3D_FEATURE_LEVEL_10_0,
};
}
fixed (ID3D11Device** device = &_device)
fixed (D3D_FEATURE_LEVEL* fl = &featureLevels[0])
{

View File

@@ -21,7 +21,7 @@
<PackageReference Include="OpenToolkit.Graphics" Version="4.0.0-pre9.1" />
<PackageReference Include="OpenToolkit.OpenAL" Version="4.0.0-pre9.1" />
<PackageReference Include="SpaceWizards.SharpFont" Version="1.0.1" />
<PackageReference Include="Robust.Natives" Version="0.1.0" />
<PackageReference Include="Robust.Natives" Version="0.1.1" />
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.20348-rc2" />
</ItemGroup>
<ItemGroup Condition="'$(EnableClientScripting)' == 'True'">

View File

@@ -735,6 +735,12 @@ namespace Robust.Shared
public static readonly CVarDef<bool> DisplayAngleForceEs2 =
CVarDef.Create("display.angle_force_es2", false, CVar.CLIENTONLY);
/// <summary>
/// Force ANGLE to create a context from a D3D11 FL 10_0 device.
/// </summary>
public static readonly CVarDef<bool> DisplayAngleForce10_0 =
CVarDef.Create("display.angle_force_10_0", false, CVar.CLIENTONLY);
/// <summary>
/// Force usage of DXGI 1.1 when using custom swap chain setup.
/// </summary>
@@ -769,6 +775,12 @@ namespace Robust.Shared
public static readonly CVarDef<bool> DisplayEgl =
CVarDef.Create("display.egl", false, CVar.CLIENTONLY);
/// <summary>
/// Enable allowES3OnFL10_0 on ANGLE.
/// </summary>
public static readonly CVarDef<bool> DisplayAngleEs3On10_0 =
CVarDef.Create("display.angle_es3_on_10_0", true, CVar.CLIENTONLY);
/// <summary>
/// Base DPI to render fonts at. This can be further scaled based on <c>display.uiScale</c>.
/// </summary>