mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-08 01:51:40 +00:00
DX11: Add real XFB mode support. May not work perfectly yet. I'm working on a set of fairly big VI-related changes. When I'm done, it should improve animation smoothness for all the backends, especially when virtual or real XFB mode is enabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7319 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a23fb0eef3
commit
6e348a2731
11 changed files with 734 additions and 16 deletions
|
@ -23,9 +23,13 @@
|
|||
#include "PixelShaderCache.h"
|
||||
#include "Render.h"
|
||||
#include "VertexShaderCache.h"
|
||||
#include "XFBEncoder.h"
|
||||
#include "HW/Memmap.h"
|
||||
|
||||
namespace DX11 {
|
||||
|
||||
static XFBEncoder s_xfbEncoder;
|
||||
|
||||
FramebufferManager::Efb FramebufferManager::m_efb;
|
||||
|
||||
D3DTexture2D* &FramebufferManager::GetEFBColorTexture() { return m_efb.color_tex; }
|
||||
|
@ -144,10 +148,14 @@ FramebufferManager::FramebufferManager()
|
|||
m_efb.resolved_color_tex = NULL;
|
||||
m_efb.resolved_depth_tex = NULL;
|
||||
}
|
||||
|
||||
s_xfbEncoder.Init();
|
||||
}
|
||||
|
||||
FramebufferManager::~FramebufferManager()
|
||||
{
|
||||
s_xfbEncoder.Shutdown();
|
||||
|
||||
SAFE_RELEASE(m_efb.color_tex);
|
||||
SAFE_RELEASE(m_efb.color_temp_tex);
|
||||
SAFE_RELEASE(m_efb.color_staging_buf);
|
||||
|
@ -160,8 +168,8 @@ FramebufferManager::~FramebufferManager()
|
|||
|
||||
void FramebufferManager::CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc,float Gamma)
|
||||
{
|
||||
// TODO
|
||||
PanicAlert("CopyToRealXFB not implemented, yet\n");
|
||||
u8* dst = Memory::GetPointer(xfbAddr);
|
||||
s_xfbEncoder.Encode(dst, fbWidth, fbHeight, sourceRc, Gamma);
|
||||
}
|
||||
|
||||
XFBSourceBase* FramebufferManager::CreateXFBSource(unsigned int target_width, unsigned int target_height)
|
||||
|
@ -197,8 +205,8 @@ void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
|
|||
|
||||
void XFBSource::DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
{
|
||||
// TODO:
|
||||
PanicAlert("RealXFB not implemented, yet\n");
|
||||
// DX11's XFB decoder does not use this function.
|
||||
// YUYV data is decoded in Render::Swap.
|
||||
}
|
||||
|
||||
void XFBSource::CopyEFB(float Gamma)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue