Merge pull request #95853 from bruvzg/win_no_id

[Windows] Simplify ANGLE fallback list and remove ID checks.
This commit is contained in:
Thaddeus Crews
2025-10-03 12:01:06 -05:00
2 changed files with 17 additions and 122 deletions

View File

@ -7162,21 +7162,27 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
bool force_angle = false;
gl_supported = gl_info["version"].operator int() >= 30003;
Vector2i device_id = _get_device_ids(gl_info["name"]);
Vector2i device_id = Vector2i(-1, -1);
Array device_list = GLOBAL_GET("rendering/gl_compatibility/force_angle_on_devices");
for (int i = 0; i < device_list.size(); i++) {
const Dictionary &device = device_list[i];
if (device.has("vendor") && device.has("name")) {
const String &vendor = device["vendor"];
const String &name = device["name"];
if (device_id != Vector2i() && vendor.begins_with("0x") && name.begins_with("0x") && device_id.x == vendor.lstrip("0x").hex_to_int() && device_id.y == name.lstrip("0x").hex_to_int()) {
// Check vendor/device IDs.
force_angle = true;
break;
} else if (gl_info["vendor"].operator String().to_upper().contains(vendor.to_upper()) && (name == "*" || gl_info["name"].operator String().to_upper().contains(name.to_upper()))) {
if (gl_info["vendor"].operator String().containsn(vendor) && (name == "*" || gl_info["name"].operator String().containsn(name))) {
// Check vendor/device names.
force_angle = true;
break;
} else if (vendor.begins_with("0x") && name.begins_with("0x")) {
if (device_id == Vector2i(-1, -1)) {
// Load device IDs.
device_id = _get_device_ids(gl_info["name"]);
}
if (device_id.x == vendor.lstrip("0x").hex_to_int() && device_id.y == name.lstrip("0x").hex_to_int()) {
// Check vendor/device IDs.
force_angle = true;
break;
}
}
}
}