mirror of
https://github.com/hyprwm/aquamarine.git
synced 2025-12-20 05:50:15 +01:00
gbm: Default to forcing linear blit for multigpu (#197)
This commit is contained in:
parent
f0db9b7eed
commit
be166e11d8
3 changed files with 7 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const auto forceLinearBlit = envEnabled("AQ_FORCE_LINEAR_BLIT");
|
static const auto forceLinearBlit = !envExplicitlyDisabled("AQ_FORCE_LINEAR_BLIT");
|
||||||
auto const oldMods = explicitModifiers; // used in FORCE_LINEAR_BLIT case.
|
auto const oldMods = explicitModifiers; // used in FORCE_LINEAR_BLIT case.
|
||||||
if (MULTIGPU && !forceLinearBlit) {
|
if (MULTIGPU && !forceLinearBlit) {
|
||||||
// Try to use the linear format if available for cross-GPU compatibility.
|
// Try to use the linear format if available for cross-GPU compatibility.
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
namespace Aquamarine {
|
namespace Aquamarine {
|
||||||
bool envEnabled(const std::string& env);
|
bool envEnabled(const std::string& env);
|
||||||
|
bool envExplicitlyDisabled(const std::string& env);
|
||||||
bool isTrace();
|
bool isTrace();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@ bool Aquamarine::envEnabled(const std::string& env) {
|
||||||
return e && e == std::string{"1"};
|
return e && e == std::string{"1"};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Aquamarine::envExplicitlyDisabled(const std::string& env) {
|
||||||
|
auto e = getenv(env.c_str());
|
||||||
|
return e && e == std::string{"0"};
|
||||||
|
}
|
||||||
|
|
||||||
static bool trace = []() -> bool { return Aquamarine::envEnabled("AQ_TRACE"); }();
|
static bool trace = []() -> bool { return Aquamarine::envEnabled("AQ_TRACE"); }();
|
||||||
|
|
||||||
bool Aquamarine::isTrace() {
|
bool Aquamarine::isTrace() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue