Select Git revision
-
Ali Can Demiralp authored
The eye choice during mono rendering mode is less hacky, and should no longer break systems other than AixCAVE.
Ali Can Demiralp authoredThe eye choice during mono rendering mode is less hacky, and should no longer break systems other than AixCAVE.
DisplayClusterDeviceBase.cpp 13.83 KiB
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "DisplayClusterDeviceBase.h"
#include "Cluster/IPDisplayClusterClusterManager.h"
#include "Cluster/Controller/IPDisplayClusterNodeController.h"
#include "Config/IPDisplayClusterConfigManager.h"
#include "Game/IPDisplayClusterGameManager.h"
#include "DisplayClusterScreenComponent.h"
#include "RHIStaticStates.h"
#include "Slate/SceneViewport.h"
#include "Misc/DisplayClusterHelpers.h"
#include "Misc/DisplayClusterLog.h"
#include "DisplayClusterGlobals.h"
#include "IPDisplayCluster.h"
#include <utility>
FDisplayClusterDeviceBase::FDisplayClusterDeviceBase() :
FRHICustomPresent()
{
UE_LOG(LogDisplayClusterRender, VeryVerbose, TEXT(".ctor FDisplayClusterDeviceBase"));
}
FDisplayClusterDeviceBase::~FDisplayClusterDeviceBase()
{
UE_LOG(LogDisplayClusterRender, VeryVerbose, TEXT(".dtor FDisplayClusterDeviceBase"));
}
bool FDisplayClusterDeviceBase::Initialize()
{
if (GDisplayCluster->GetOperationMode() == EDisplayClusterOperationMode::Disabled)
{
return false;
}
UE_LOG(LogDisplayClusterRender, Log, TEXT("Use swap interval: %d"), SwapInterval);
return true;
}
void FDisplayClusterDeviceBase::WaitForBufferSwapSync(int32& InOutSyncInterval)
{
// Perform SW synchronization
UE_LOG(LogDisplayClusterRender, Verbose, TEXT("Waiting for swap sync..."));
// Policies below are available for any render device type
switch (SwapSyncPolicy)
{
case EDisplayClusterSwapSyncPolicy::None:
{
exec_BarrierWait();
InOutSyncInterval = 0;
break;
}
default:
{
UE_LOG(LogDisplayClusterRender, Warning, TEXT("Swap sync policy drop: %d"), (int)SwapSyncPolicy);
InOutSyncInterval = 0;
break;
}
}
}