mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 04:31:57 -07:00
config: nuke explicit_sync settings
were not used anymore, explicit is on by default
This commit is contained in:
@@ -1439,18 +1439,6 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
|
|||||||
* render:
|
* render:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SConfigOptionDescription{
|
|
||||||
.value = "render:explicit_sync",
|
|
||||||
.description = "Whether to enable explicit sync support. Requires a hyprland restart. 0 - no, 1 - yes, 2 - auto based on the gpu driver",
|
|
||||||
.type = CONFIG_OPTION_INT,
|
|
||||||
.data = SConfigOptionDescription::SRangeData{2, 0, 2},
|
|
||||||
},
|
|
||||||
SConfigOptionDescription{
|
|
||||||
.value = "render:explicit_sync_kms",
|
|
||||||
.description = "Whether to enable explicit sync support for the KMS layer. Requires explicit_sync to be enabled. 0 - no, 1 - yes, 2 - auto based on the gpu driver",
|
|
||||||
.type = CONFIG_OPTION_INT,
|
|
||||||
.data = SConfigOptionDescription::SRangeData{2, 0, 2},
|
|
||||||
},
|
|
||||||
SConfigOptionDescription{
|
SConfigOptionDescription{
|
||||||
.value = "render:direct_scanout",
|
.value = "render:direct_scanout",
|
||||||
.description = "Enables direct scanout. Direct scanout attempts to reduce lag when there is only one fullscreen application on a screen (e.g. game). It is also "
|
.description = "Enables direct scanout. Direct scanout attempts to reduce lag when there is only one fullscreen application on a screen (e.g. game). It is also "
|
||||||
|
@@ -741,8 +741,6 @@ CConfigManager::CConfigManager() {
|
|||||||
registerConfigVar("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
registerConfigVar("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
||||||
registerConfigVar("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
registerConfigVar("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
||||||
|
|
||||||
registerConfigVar("render:explicit_sync", Hyprlang::INT{2});
|
|
||||||
registerConfigVar("render:explicit_sync_kms", Hyprlang::INT{2});
|
|
||||||
registerConfigVar("render:direct_scanout", Hyprlang::INT{0});
|
registerConfigVar("render:direct_scanout", Hyprlang::INT{0});
|
||||||
registerConfigVar("render:expand_undersized_textures", Hyprlang::INT{1});
|
registerConfigVar("render:expand_undersized_textures", Hyprlang::INT{1});
|
||||||
registerConfigVar("render:xp_mode", Hyprlang::INT{0});
|
registerConfigVar("render:xp_mode", Hyprlang::INT{0});
|
||||||
@@ -1124,9 +1122,6 @@ Hyprlang::CParseResult CConfigManager::handleMonitorv2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
|
void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
|
||||||
static const auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("render:explicit_sync");
|
|
||||||
static int prevEnabledExplicit = *PENABLEEXPLICIT;
|
|
||||||
|
|
||||||
updateWatcher();
|
updateWatcher();
|
||||||
|
|
||||||
for (auto const& w : g_pCompositor->m_windows) {
|
for (auto const& w : g_pCompositor->m_windows) {
|
||||||
@@ -1162,8 +1157,6 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
|
|||||||
"Warning: You're using an autogenerated config! Edit the config file to get rid of this message. (config file: " + getMainConfigPath() +
|
"Warning: You're using an autogenerated config! Edit the config file to get rid of this message. (config file: " + getMainConfigPath() +
|
||||||
" )\nSUPER+Q -> kitty (if it doesn't launch, make sure it's installed or choose a different terminal in the config)\nSUPER+M -> exit Hyprland",
|
" )\nSUPER+Q -> kitty (if it doesn't launch, make sure it's installed or choose a different terminal in the config)\nSUPER+M -> exit Hyprland",
|
||||||
CHyprColor(1.0, 1.0, 70.0 / 255.0, 1.0));
|
CHyprColor(1.0, 1.0, 70.0 / 255.0, 1.0));
|
||||||
else if (*PENABLEEXPLICIT != prevEnabledExplicit)
|
|
||||||
g_pHyprError->queueCreate("Warning: You changed the render:explicit_sync option, this requires you to restart Hyprland.", CHyprColor(0.9, 0.76, 0.221, 1.0));
|
|
||||||
else
|
else
|
||||||
g_pHyprError->destroy();
|
g_pHyprError->destroy();
|
||||||
|
|
||||||
@@ -1267,10 +1260,7 @@ void CConfigManager::init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::string& VALUE) {
|
std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::string& VALUE) {
|
||||||
static const auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("render:explicit_sync");
|
const auto RET = m_config->parseDynamic(COMMAND.c_str(), VALUE.c_str());
|
||||||
static int prevEnabledExplicit = *PENABLEEXPLICIT;
|
|
||||||
|
|
||||||
const auto RET = m_config->parseDynamic(COMMAND.c_str(), VALUE.c_str());
|
|
||||||
|
|
||||||
// invalidate layouts if they changed
|
// invalidate layouts if they changed
|
||||||
if (COMMAND == "monitor" || COMMAND.contains("gaps_") || COMMAND.starts_with("dwindle:") || COMMAND.starts_with("master:")) {
|
if (COMMAND == "monitor" || COMMAND.contains("gaps_") || COMMAND.starts_with("dwindle:") || COMMAND.starts_with("master:")) {
|
||||||
@@ -1278,13 +1268,6 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::
|
|||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->m_id);
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (COMMAND.contains("explicit")) {
|
|
||||||
if (*PENABLEEXPLICIT != prevEnabledExplicit)
|
|
||||||
g_pHyprError->queueCreate("Warning: You changed the render:explicit_sync option, this requires you to restart Hyprland.", CHyprColor(0.9, 0.76, 0.221, 1.0));
|
|
||||||
else
|
|
||||||
g_pHyprError->destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update window border colors
|
// Update window border colors
|
||||||
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
||||||
|
|
||||||
|
@@ -100,10 +100,9 @@ void CProtocolManager::onMonitorModeChange(PHLMONITOR pMonitor) {
|
|||||||
|
|
||||||
CProtocolManager::CProtocolManager() {
|
CProtocolManager::CProtocolManager() {
|
||||||
|
|
||||||
static const auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("render:explicit_sync");
|
static const auto PENABLECM = CConfigValue<Hyprlang::INT>("render:cm_enabled");
|
||||||
static const auto PENABLECM = CConfigValue<Hyprlang::INT>("render:cm_enabled");
|
static const auto PENABLEXXCM = CConfigValue<Hyprlang::INT>("experimental:xx_color_management_v4");
|
||||||
static const auto PENABLEXXCM = CConfigValue<Hyprlang::INT>("experimental:xx_color_management_v4");
|
static const auto PDEBUGCM = CConfigValue<Hyprlang::INT>("debug:full_cm_proto");
|
||||||
static const auto PDEBUGCM = CConfigValue<Hyprlang::INT>("debug:full_cm_proto");
|
|
||||||
|
|
||||||
// Outputs are a bit dumb, we have to agree.
|
// Outputs are a bit dumb, we have to agree.
|
||||||
static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
|
static auto P = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
|
||||||
@@ -209,7 +208,7 @@ CProtocolManager::CProtocolManager() {
|
|||||||
else
|
else
|
||||||
lease.reset();
|
lease.reset();
|
||||||
|
|
||||||
if (*PENABLEEXPLICIT && !PROTO::sync)
|
if (!PROTO::sync)
|
||||||
PROTO::sync = makeUnique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
PROTO::sync = makeUnique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2347,33 +2347,6 @@ bool CHyprRenderer::isNvidia() {
|
|||||||
return m_nvidia;
|
return m_nvidia;
|
||||||
}
|
}
|
||||||
|
|
||||||
SExplicitSyncSettings CHyprRenderer::getExplicitSyncSettings(SP<Aquamarine::IOutput> output) {
|
|
||||||
static auto PENABLEEXPLICIT = CConfigValue<Hyprlang::INT>("render:explicit_sync");
|
|
||||||
static auto PENABLEEXPLICITKMS = CConfigValue<Hyprlang::INT>("render:explicit_sync_kms");
|
|
||||||
|
|
||||||
SExplicitSyncSettings settings;
|
|
||||||
settings.explicitEnabled = *PENABLEEXPLICIT;
|
|
||||||
settings.explicitKMSEnabled = *PENABLEEXPLICITKMS;
|
|
||||||
|
|
||||||
if (!output->supportsExplicit) {
|
|
||||||
settings.explicitEnabled = false;
|
|
||||||
settings.explicitKMSEnabled = false;
|
|
||||||
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*PENABLEEXPLICIT == 2 /* auto */)
|
|
||||||
settings.explicitEnabled = true;
|
|
||||||
if (*PENABLEEXPLICITKMS == 2 /* auto */) {
|
|
||||||
if (!m_nvidia)
|
|
||||||
settings.explicitKMSEnabled = true;
|
|
||||||
else {
|
|
||||||
settings.explicitKMSEnabled = isNvidiaDriverVersionAtLeast(560);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CHyprRenderer::addWindowToRenderUnfocused(PHLWINDOW window) {
|
void CHyprRenderer::addWindowToRenderUnfocused(PHLWINDOW window) {
|
||||||
static auto PFPS = CConfigValue<Hyprlang::INT>("misc:render_unfocused_fps");
|
static auto PFPS = CConfigValue<Hyprlang::INT>("misc:render_unfocused_fps");
|
||||||
|
|
||||||
|
@@ -41,10 +41,6 @@ class CToplevelExportProtocolManager;
|
|||||||
class CInputManager;
|
class CInputManager;
|
||||||
struct SSessionLockSurface;
|
struct SSessionLockSurface;
|
||||||
|
|
||||||
struct SExplicitSyncSettings {
|
|
||||||
bool explicitEnabled = false, explicitKMSEnabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SRenderWorkspaceUntilData {
|
struct SRenderWorkspaceUntilData {
|
||||||
PHLLS ls;
|
PHLLS ls;
|
||||||
PHLWINDOW w;
|
PHLWINDOW w;
|
||||||
@@ -81,7 +77,6 @@ class CHyprRenderer {
|
|||||||
bool isNvidia();
|
bool isNvidia();
|
||||||
void makeEGLCurrent();
|
void makeEGLCurrent();
|
||||||
void unsetEGL();
|
void unsetEGL();
|
||||||
SExplicitSyncSettings getExplicitSyncSettings(SP<Aquamarine::IOutput> output);
|
|
||||||
void addWindowToRenderUnfocused(PHLWINDOW window);
|
void addWindowToRenderUnfocused(PHLWINDOW window);
|
||||||
void makeSnapshot(PHLWINDOW);
|
void makeSnapshot(PHLWINDOW);
|
||||||
void makeSnapshot(PHLLS);
|
void makeSnapshot(PHLLS);
|
||||||
|
Reference in New Issue
Block a user