Fix #145449: Workaround wrongly generated Intel Linux driver version

There are several Driver versions which are constructing the wrong,
semantically, version which would force Blender to decline the Intel
device for oneAPI backend usage, based on this. Unfortunately,
the upstream fix is taking a long time to be finally delivered to
the distros and end-users, so it is better if Blender will detect
this wrong version string and parse it properly, allowing these
devices to be used - as the wrong driver version string is the only
issue here, besides this the driver functionality is fine.

Pull Request: https://projects.blender.org/blender/blender/pulls/145658
This commit is contained in:
Nikita Sirgienko
2025-09-03 19:26:05 +02:00
committed by Nikita Sirgienko
parent 8536fd1223
commit 5efeb06613

View File

@@ -1373,6 +1373,13 @@ int parse_driver_build_version(const sycl::device &device)
driver_build_version = std::stoi(third_number_substr) * 10000 +
std::stoi(forth_number_substr);
}
/* This is actually not a correct version string (Major.Minor.Patch.Optional), see blender
* bug report #137277, but there are several driver versions with this Intel bug existing
* at this point, so it is worth working around this issue in Blender source code, allowing
* users to actually use Intel GPU when it is possible. */
else if (third_number_substr.length() == 5 && forth_number_substr.length() == 6) {
driver_build_version = std::stoi(third_number_substr);
}
}
else {
const std::string &third_number_substr = driver_version.substr(second_dot_position + 1);