mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Fix] (Init): allow MobileGL initialization with LIBGL_ALWAYS_SOFTWARE
This commit is contained in:
@@ -238,18 +238,6 @@ namespace MobileGL {
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
// LIBGL_ALWAYS_SOFTWARE is how a process (or whoever launched it) asks the system's GL for a
|
||||
// software renderer. MobileGL is a GPU forwarder, so it steps aside and lets the system's
|
||||
// other implementation give the process what it asked for.
|
||||
{
|
||||
String software;
|
||||
if (MG_ConfigLoader::LookupSetting("LIBGL_ALWAYS_SOFTWARE", software) && !software.empty() &&
|
||||
software != "0" && software != "false") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
// Not yet: the bring-up would dial the configured server and wait for it. Ask first.
|
||||
return MG_Remote::Client::ConfiguredServerAvailable();
|
||||
|
||||
@@ -322,12 +322,13 @@ namespace {
|
||||
EXPECT_EQ(r.glxLoaded, 1);
|
||||
EXPECT_EQ(r.clientQueries, 1);
|
||||
|
||||
// A process that asked for software rendering is left to the system's other GL, server or not.
|
||||
// Mesa's software-renderer selection must not disable MobileGL's EGL/GLX entry points.
|
||||
const EntryReport software = RunEntryPoints(server.endpoint, logBase, true);
|
||||
EXPECT_EQ(software.vendorDisplay, 0);
|
||||
EXPECT_EQ(software.getDisplay, 0);
|
||||
EXPECT_EQ(software.vendorDevices, 0);
|
||||
EXPECT_EQ(software.glxLoaded, 0);
|
||||
EXPECT_EQ(software.vendorDisplay, 1);
|
||||
EXPECT_EQ(software.getDisplay, 1);
|
||||
EXPECT_EQ(software.vendorDevices, 1);
|
||||
EXPECT_EQ(software.glxLoaded, 1);
|
||||
EXPECT_EQ(software.clientQueries, 1);
|
||||
std::error_code ec;
|
||||
std::filesystem::remove(Debug::RoleLogPath(logBase.c_str(), Debug::LogRole::Client), ec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user