internal/graphicsdriver/directx: change the default feature level to 11_0

The feature level 12_0 causes some issues on some machines. As we now
have EBITENGINE_DIRECTX_FEATURE_LEVEL, let's go back to the default
feature level 11_0.

Updates #2486
This commit is contained in:
Hajime Hoshi 2022-12-07 21:16:45 +09:00
parent dc47d472d0
commit a4d20094d7
2 changed files with 4 additions and 4 deletions

2
doc.go
View File

@ -83,7 +83,7 @@
//
// `EBITENGINE_DIRECTX_FEATURE_LEVEL` environment variable specifies DirectX feature level.
// The possible values are "11_0", "11_1", "12_0", "12_1", and "12_2".
// The default value is "12_0".
// The default value is "11_0".
//
// # Build tags
//

View File

@ -181,9 +181,9 @@ func (g *Graphics) initialize() (ferr error) {
}
}
// Ebitengine itself doesn't require the features level 12 and 11 should be enough,
// but some old cards don't work well (#2447). Specify the level 12 by default.
var featureLevel _D3D_FEATURE_LEVEL = _D3D_FEATURE_LEVEL_12_0
// Specify the level 11 by default.
// Some old cards don't work well with the default feature level (#2447, #2486).
var featureLevel _D3D_FEATURE_LEVEL = _D3D_FEATURE_LEVEL_11_0
if env := os.Getenv("EBITENGINE_DIRECTX_FEATURE_LEVEL"); env != "" {
switch env {
case "11_0":