Disable OpenGL ANGLE backend.
Currently ANGLE can work through desktop OpenGL only with enabled attribute EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE. Qt can't work with it enabled and shows vertically flipped content.
This commit is contained in:
parent
39a80c6604
commit
c5718678ea
|
@ -123,7 +123,7 @@ void SetCrashAnnotationsGL() {
|
||||||
case Ui::GL::ANGLE::D3D11: return "Direct3D 11";
|
case Ui::GL::ANGLE::D3D11: return "Direct3D 11";
|
||||||
case Ui::GL::ANGLE::D3D9: return "Direct3D 9";
|
case Ui::GL::ANGLE::D3D9: return "Direct3D 9";
|
||||||
case Ui::GL::ANGLE::D3D11on12: return "D3D11on12";
|
case Ui::GL::ANGLE::D3D11on12: return "D3D11on12";
|
||||||
case Ui::GL::ANGLE::OpenGL: return "OpenGL";
|
//case Ui::GL::ANGLE::OpenGL: return "OpenGL";
|
||||||
}
|
}
|
||||||
Unexpected("Ui::GL::CurrentANGLE value in SetupANGLE.");
|
Unexpected("Ui::GL::CurrentANGLE value in SetupANGLE.");
|
||||||
}());
|
}());
|
||||||
|
|
|
@ -737,18 +737,19 @@ void SetupANGLE(
|
||||||
tr::lng_settings_angle_backend_d3d11(tr::now),
|
tr::lng_settings_angle_backend_d3d11(tr::now),
|
||||||
tr::lng_settings_angle_backend_d3d9(tr::now),
|
tr::lng_settings_angle_backend_d3d9(tr::now),
|
||||||
tr::lng_settings_angle_backend_d3d11on12(tr::now),
|
tr::lng_settings_angle_backend_d3d11on12(tr::now),
|
||||||
tr::lng_settings_angle_backend_opengl(tr::now),
|
//tr::lng_settings_angle_backend_opengl(tr::now),
|
||||||
tr::lng_settings_angle_backend_disabled(tr::now),
|
tr::lng_settings_angle_backend_disabled(tr::now),
|
||||||
};
|
};
|
||||||
const auto backendIndex = [] {
|
const auto disabled = int(options.size()) - 1;
|
||||||
|
const auto backendIndex = [=] {
|
||||||
if (Core::App().settings().disableOpenGL()) {
|
if (Core::App().settings().disableOpenGL()) {
|
||||||
return 5;
|
return disabled;
|
||||||
} else switch (Ui::GL::CurrentANGLE()) {
|
} else switch (Ui::GL::CurrentANGLE()) {
|
||||||
case ANGLE::Auto: return 0;
|
case ANGLE::Auto: return 0;
|
||||||
case ANGLE::D3D11: return 1;
|
case ANGLE::D3D11: return 1;
|
||||||
case ANGLE::D3D9: return 2;
|
case ANGLE::D3D9: return 2;
|
||||||
case ANGLE::D3D11on12: return 3;
|
case ANGLE::D3D11on12: return 3;
|
||||||
case ANGLE::OpenGL: return 4;
|
//case ANGLE::OpenGL: return 4;
|
||||||
}
|
}
|
||||||
Unexpected("Ui::GL::CurrentANGLE value in SetupANGLE.");
|
Unexpected("Ui::GL::CurrentANGLE value in SetupANGLE.");
|
||||||
}();
|
}();
|
||||||
|
@ -764,7 +765,7 @@ void SetupANGLE(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto confirmed = crl::guard(button, [=] {
|
const auto confirmed = crl::guard(button, [=] {
|
||||||
const auto nowDisabled = (index == 5);
|
const auto nowDisabled = (index == disabled);
|
||||||
if (!nowDisabled) {
|
if (!nowDisabled) {
|
||||||
Ui::GL::ChangeANGLE([&] {
|
Ui::GL::ChangeANGLE([&] {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
@ -772,12 +773,12 @@ void SetupANGLE(
|
||||||
case 1: return ANGLE::D3D11;
|
case 1: return ANGLE::D3D11;
|
||||||
case 2: return ANGLE::D3D9;
|
case 2: return ANGLE::D3D9;
|
||||||
case 3: return ANGLE::D3D11on12;
|
case 3: return ANGLE::D3D11on12;
|
||||||
case 4: return ANGLE::OpenGL;
|
//case 4: return ANGLE::OpenGL;
|
||||||
}
|
}
|
||||||
Unexpected("Index in SetupANGLE.");
|
Unexpected("Index in SetupANGLE.");
|
||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
const auto wasDisabled = (backendIndex == 5);
|
const auto wasDisabled = (backendIndex == disabled);
|
||||||
if (nowDisabled != wasDisabled) {
|
if (nowDisabled != wasDisabled) {
|
||||||
Core::App().settings().setDisableOpenGL(nowDisabled);
|
Core::App().settings().setDisableOpenGL(nowDisabled);
|
||||||
Local::writeSettings();
|
Local::writeSettings();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5f2e0a32b12df1468419b123ac8fb4bb17cf47cc
|
Subproject commit b49ee81df9d285d08ef6bf834c6e14c5064b4070
|
Loading…
Reference in New Issue