2015-05-24 04:32:32 +00:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
#include "VideoCommon/FramebufferManagerBase.h"
|
2017-02-03 17:31:20 +00:00
|
|
|
|
2015-12-21 19:11:01 +00:00
|
|
|
#include <memory>
|
2017-02-03 17:31:20 +00:00
|
|
|
|
2018-07-17 03:24:36 +00:00
|
|
|
#include "VideoCommon/AbstractTexture.h"
|
2018-07-17 03:26:37 +00:00
|
|
|
#include "VideoCommon/DriverDetails.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoCommon/RenderBase.h"
|
2010-11-14 23:56:26 +00:00
|
|
|
|
2015-12-22 23:47:20 +00:00
|
|
|
std::unique_ptr<FramebufferManagerBase> g_framebuffer_manager;
|
2010-11-14 23:56:26 +00:00
|
|
|
|
2014-11-06 10:41:39 +00:00
|
|
|
unsigned int FramebufferManagerBase::m_EFBLayers = 1;
|
|
|
|
|
2017-08-07 04:05:42 +00:00
|
|
|
FramebufferManagerBase::~FramebufferManagerBase() = default;
|
2018-07-17 03:24:36 +00:00
|
|
|
|
|
|
|
AbstractTextureFormat FramebufferManagerBase::GetEFBDepthFormat()
|
|
|
|
{
|
2018-07-17 03:26:37 +00:00
|
|
|
// 32-bit depth clears are broken in the Adreno Vulkan driver, and have no effect.
|
|
|
|
// To work around this, we use a D24_S8 buffer instead, which results in a loss of accuracy.
|
|
|
|
// We still resolve this to a R32F texture, as there is no 24-bit format.
|
|
|
|
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_D32F_CLEAR))
|
|
|
|
return AbstractTextureFormat::D24_S8;
|
|
|
|
else
|
|
|
|
return AbstractTextureFormat::D32F;
|
2018-07-17 03:24:36 +00:00
|
|
|
}
|