mirror of https://github.com/hyprwm/Hyprland
stuff for aq alloc split
This commit is contained in:
parent
959e83fd4d
commit
95ddf9e7eb
|
@ -815,5 +815,6 @@ bool CMonitorState::updateSwapchain() {
|
|||
options.scanout = true;
|
||||
options.length = 2;
|
||||
options.size = MODE->pixelSize;
|
||||
options.multigpu = m_pOwner->output->swapchain->getAllocator()->drmFD() != g_pCompositor->m_iDRMFD;
|
||||
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)
|
||||
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();
|
||||
options.size = maxSize;
|
||||
options.length = 2;
|
||||
options.scanout = 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,
|
||||
// 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) {
|
||||
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() *
|
||||
pMonitor->scale;
|
||||
}
|
||||
|
|
|
@ -521,7 +521,8 @@ GLuint CHyprOpenGLImpl::compileShader(const GLuint& type, std::string src, bool
|
|||
}
|
||||
|
||||
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 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 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)
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue