mirror of https://github.com/hyprwm/Hyprland
stuff for aq alloc split
This commit is contained in:
parent
959e83fd4d
commit
95ddf9e7eb
|
@ -556,7 +556,7 @@ CConfigManager::CConfigManager() {
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66777700"});
|
m_pConfig->addConfigValue("group:groupbar:col.inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66777700"});
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
m_pConfig->addConfigValue("group:groupbar:col.locked_active", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66ff5500"});
|
||||||
m_pConfig->addConfigValue("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
m_pConfig->addConfigValue("group:groupbar:col.locked_inactive", Hyprlang::CConfigCustomValueType{&configHandleGradientSet, configHandleGradientDestroy, "0x66775500"});
|
||||||
|
|
||||||
m_pConfig->addConfigValue("experimental:explicit_sync", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("experimental:explicit_sync", Hyprlang::INT{0});
|
||||||
|
|
||||||
// devices
|
// devices
|
||||||
|
|
|
@ -811,9 +811,10 @@ bool CMonitorState::updateSwapchain() {
|
||||||
const auto& MODE = STATE.mode ? STATE.mode : STATE.customMode;
|
const auto& MODE = STATE.mode ? STATE.mode : STATE.customMode;
|
||||||
if (!MODE)
|
if (!MODE)
|
||||||
return true;
|
return true;
|
||||||
options.format = STATE.drmFormat;
|
options.format = STATE.drmFormat;
|
||||||
options.scanout = true;
|
options.scanout = true;
|
||||||
options.length = 2;
|
options.length = 2;
|
||||||
options.size = MODE->pixelSize;
|
options.size = MODE->pixelSize;
|
||||||
|
options.multigpu = m_pOwner->output->swapchain->getAllocator()->drmFD() != g_pCompositor->m_iDRMFD;
|
||||||
return m_pOwner->output->swapchain->reconfigure(options);
|
return m_pOwner->output->swapchain->reconfigure(options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,13 +367,14 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
||||||
if (!state->monitor->cursorSwapchain || maxSize != state->monitor->cursorSwapchain->currentOptions().size) {
|
if (!state->monitor->cursorSwapchain || maxSize != state->monitor->cursorSwapchain->currentOptions().size) {
|
||||||
|
|
||||||
if (!state->monitor->cursorSwapchain)
|
if (!state->monitor->cursorSwapchain)
|
||||||
state->monitor->cursorSwapchain = Aquamarine::CSwapchain::create(g_pCompositor->m_pAqBackend->allocator, state->monitor->output->getBackend());
|
state->monitor->cursorSwapchain = Aquamarine::CSwapchain::create(state->monitor->output->getBackend()->preferredAllocator(), state->monitor->output->getBackend());
|
||||||
|
|
||||||
auto options = state->monitor->cursorSwapchain->currentOptions();
|
auto options = state->monitor->cursorSwapchain->currentOptions();
|
||||||
options.size = maxSize;
|
options.size = maxSize;
|
||||||
options.length = 2;
|
options.length = 2;
|
||||||
options.scanout = true;
|
options.scanout = true;
|
||||||
options.cursor = true;
|
options.cursor = true;
|
||||||
|
options.multigpu = state->monitor->output->getBackend()->preferredAllocator()->drmFD() != g_pCompositor->m_iDRMFD;
|
||||||
// We do not set the format. If it's unset (DRM_FORMAT_INVALID) then the swapchain will pick for us,
|
// We do not set the format. If it's unset (DRM_FORMAT_INVALID) then the swapchain will pick for us,
|
||||||
// but if it's set, we don't wanna change it.
|
// but if it's set, we don't wanna change it.
|
||||||
|
|
||||||
|
@ -455,7 +456,8 @@ void CPointerManager::renderSoftwareCursorsFor(SP<CMonitor> pMonitor, timespec*
|
||||||
|
|
||||||
Vector2D CPointerManager::getCursorPosForMonitor(SP<CMonitor> pMonitor) {
|
Vector2D CPointerManager::getCursorPosForMonitor(SP<CMonitor> pMonitor) {
|
||||||
return CBox{pointerPos - pMonitor->vecPosition, {0, 0}}
|
return CBox{pointerPos - pMonitor->vecPosition, {0, 0}}
|
||||||
.transform(wlTransformToHyprutils(invertTransform(pMonitor->transform)), pMonitor->vecTransformedSize.x / pMonitor->scale, pMonitor->vecTransformedSize.y / pMonitor->scale)
|
.transform(wlTransformToHyprutils(invertTransform(pMonitor->transform)), pMonitor->vecTransformedSize.x / pMonitor->scale,
|
||||||
|
pMonitor->vecTransformedSize.y / pMonitor->scale)
|
||||||
.pos() *
|
.pos() *
|
||||||
pMonitor->scale;
|
pMonitor->scale;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ class CEventLoopManager {
|
||||||
int timerfd = -1;
|
int timerfd = -1;
|
||||||
} m_sTimers;
|
} m_sTimers;
|
||||||
|
|
||||||
SIdleData m_sIdle;
|
SIdleData m_sIdle;
|
||||||
std::vector<SP<Aquamarine::SPollFD>> aqPollFDs;
|
std::vector<SP<Aquamarine::SPollFD>> aqPollFDs;
|
||||||
|
|
||||||
friend class CSyncTimeline;
|
friend class CSyncTimeline;
|
||||||
|
|
|
@ -21,7 +21,7 @@ class CViewportResource {
|
||||||
SP<CWpViewport> resource;
|
SP<CWpViewport> resource;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
CHyprSignalListener surfacePrecommit;
|
CHyprSignalListener surfacePrecommit;
|
||||||
} listeners;
|
} listeners;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -521,7 +521,8 @@ GLuint CHyprOpenGLImpl::compileShader(const GLuint& type, std::string src, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) {
|
bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) {
|
||||||
// passes requiring introspection are the ones that need to render blur.
|
// passes requiring introspection are the ones that need to render blur,
|
||||||
|
// or when we are rendering to a multigpu target
|
||||||
|
|
||||||
static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
|
static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
|
||||||
static auto PXRAY = CConfigValue<Hyprlang::INT>("decoration:blur:xray");
|
static auto PXRAY = CConfigValue<Hyprlang::INT>("decoration:blur:xray");
|
||||||
|
@ -529,6 +530,12 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) {
|
||||||
static auto PBLURSPECIAL = CConfigValue<Hyprlang::INT>("decoration:blur:special");
|
static auto PBLURSPECIAL = CConfigValue<Hyprlang::INT>("decoration:blur:special");
|
||||||
static auto PBLURPOPUPS = CConfigValue<Hyprlang::INT>("decoration:blur:popups");
|
static auto PBLURPOPUPS = CConfigValue<Hyprlang::INT>("decoration:blur:popups");
|
||||||
|
|
||||||
|
// multigpu destination
|
||||||
|
if (pMonitor->output->swapchain->getAllocator()->drmFD() != g_pCompositor->m_iDRMFD) {
|
||||||
|
Debug::log(TRACE, "passRequiresIntrospection: multigpu target, forcing");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_RenderData.mouseZoomFactor != 1.0 || g_pHyprRenderer->m_bCrashingInProgress)
|
if (m_RenderData.mouseZoomFactor != 1.0 || g_pHyprRenderer->m_bCrashingInProgress)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -2754,7 +2761,7 @@ SP<CEGLSync> CHyprOpenGLImpl::createEGLSync(int fenceFD) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto eglsync = SP<CEGLSync>(new CEGLSync);
|
auto eglsync = SP<CEGLSync>(new CEGLSync);
|
||||||
eglsync->sync = sync;
|
eglsync->sync = sync;
|
||||||
return eglsync;
|
return eglsync;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,16 +88,16 @@ class CHyprRenderer {
|
||||||
DAMAGETRACKINGMODES
|
DAMAGETRACKINGMODES
|
||||||
damageTrackingModeFromStr(const std::string&);
|
damageTrackingModeFromStr(const std::string&);
|
||||||
|
|
||||||
bool attemptDirectScanout(CMonitor*);
|
bool attemptDirectScanout(CMonitor*);
|
||||||
void setSurfaceScanoutMode(SP<CWLSurfaceResource> surface, SP<CMonitor> monitor); // nullptr monitor resets
|
void setSurfaceScanoutMode(SP<CWLSurfaceResource> surface, SP<CMonitor> monitor); // nullptr monitor resets
|
||||||
void initiateManualCrash();
|
void initiateManualCrash();
|
||||||
|
|
||||||
bool m_bCrashingInProgress = false;
|
bool m_bCrashingInProgress = false;
|
||||||
float m_fCrashingDistort = 0.5f;
|
float m_fCrashingDistort = 0.5f;
|
||||||
wl_event_source* m_pCrashingLoop = nullptr;
|
wl_event_source* m_pCrashingLoop = nullptr;
|
||||||
wl_event_source* m_pCursorTicker = nullptr;
|
wl_event_source* m_pCursorTicker = nullptr;
|
||||||
|
|
||||||
CTimer m_tRenderTimer;
|
CTimer m_tRenderTimer;
|
||||||
|
|
||||||
std::vector<SP<CWLSurfaceResource>> explicitPresented;
|
std::vector<SP<CWLSurfaceResource>> explicitPresented;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue