Merge pull request #4322 from Helios747/I_hate_features
Remove Frameskip
This commit is contained in:
commit
a86b2c15d8
|
@ -56,7 +56,6 @@ public:
|
||||||
// alone on restore (false)
|
// alone on restore (false)
|
||||||
bool bSetEmulationSpeed;
|
bool bSetEmulationSpeed;
|
||||||
bool bSetVolume;
|
bool bSetVolume;
|
||||||
bool bSetFrameSkip;
|
|
||||||
std::array<bool, MAX_BBMOTES> bSetWiimoteSource;
|
std::array<bool, MAX_BBMOTES> bSetWiimoteSource;
|
||||||
std::array<bool, MAX_SI_CHANNELS> bSetPads;
|
std::array<bool, MAX_SI_CHANNELS> bSetPads;
|
||||||
std::array<bool, MAX_EXI_CHANNELS> bSetEXIDevice;
|
std::array<bool, MAX_EXI_CHANNELS> bSetEXIDevice;
|
||||||
|
@ -80,7 +79,6 @@ private:
|
||||||
int iSelectedLanguage;
|
int iSelectedLanguage;
|
||||||
int iCPUCore;
|
int iCPUCore;
|
||||||
int Volume;
|
int Volume;
|
||||||
unsigned int frameSkip;
|
|
||||||
float m_EmulationSpeed;
|
float m_EmulationSpeed;
|
||||||
std::string strBackend;
|
std::string strBackend;
|
||||||
std::string sBackend;
|
std::string sBackend;
|
||||||
|
@ -112,7 +110,6 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||||
iCPUCore = config.iCPUCore;
|
iCPUCore = config.iCPUCore;
|
||||||
Volume = config.m_Volume;
|
Volume = config.m_Volume;
|
||||||
m_EmulationSpeed = config.m_EmulationSpeed;
|
m_EmulationSpeed = config.m_EmulationSpeed;
|
||||||
frameSkip = config.m_FrameSkip;
|
|
||||||
strBackend = config.m_strVideoBackend;
|
strBackend = config.m_strVideoBackend;
|
||||||
sBackend = config.sBackend;
|
sBackend = config.sBackend;
|
||||||
m_strGPUDeterminismMode = config.m_strGPUDeterminismMode;
|
m_strGPUDeterminismMode = config.m_strGPUDeterminismMode;
|
||||||
|
@ -123,7 +120,6 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||||
|
|
||||||
bSetEmulationSpeed = false;
|
bSetEmulationSpeed = false;
|
||||||
bSetVolume = false;
|
bSetVolume = false;
|
||||||
bSetFrameSkip = false;
|
|
||||||
bSetWiimoteSource.fill(false);
|
bSetWiimoteSource.fill(false);
|
||||||
bSetPads.fill(false);
|
bSetPads.fill(false);
|
||||||
bSetEXIDevice.fill(false);
|
bSetEXIDevice.fill(false);
|
||||||
|
@ -182,12 +178,6 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||||
if (bSetEmulationSpeed)
|
if (bSetEmulationSpeed)
|
||||||
config->m_EmulationSpeed = m_EmulationSpeed;
|
config->m_EmulationSpeed = m_EmulationSpeed;
|
||||||
|
|
||||||
if (bSetFrameSkip)
|
|
||||||
{
|
|
||||||
config->m_FrameSkip = frameSkip;
|
|
||||||
Movie::SetFrameSkipping(frameSkip);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < MAX_EXI_CHANNELS; ++i)
|
for (unsigned int i = 0; i < MAX_EXI_CHANNELS; ++i)
|
||||||
{
|
{
|
||||||
if (bSetEXIDevice[i])
|
if (bSetEXIDevice[i])
|
||||||
|
@ -264,11 +254,6 @@ bool BootCore(const std::string& _rFilename)
|
||||||
if (core_section->Get("EmulationSpeed", &SConfig::GetInstance().m_EmulationSpeed,
|
if (core_section->Get("EmulationSpeed", &SConfig::GetInstance().m_EmulationSpeed,
|
||||||
SConfig::GetInstance().m_EmulationSpeed))
|
SConfig::GetInstance().m_EmulationSpeed))
|
||||||
config_cache.bSetEmulationSpeed = true;
|
config_cache.bSetEmulationSpeed = true;
|
||||||
if (core_section->Get("FrameSkip", &SConfig::GetInstance().m_FrameSkip))
|
|
||||||
{
|
|
||||||
config_cache.bSetFrameSkip = true;
|
|
||||||
Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dsp_section->Get("Volume", &SConfig::GetInstance().m_Volume,
|
if (dsp_section->Get("Volume", &SConfig::GetInstance().m_Volume,
|
||||||
SConfig::GetInstance().m_Volume))
|
SConfig::GetInstance().m_Volume))
|
||||||
|
|
|
@ -44,8 +44,6 @@
|
||||||
// The chunk to allocate movie data in multiples of.
|
// The chunk to allocate movie data in multiples of.
|
||||||
#define DTM_BASE_LENGTH (1024)
|
#define DTM_BASE_LENGTH (1024)
|
||||||
|
|
||||||
static std::mutex cs_frameSkip;
|
|
||||||
|
|
||||||
namespace Movie
|
namespace Movie
|
||||||
{
|
{
|
||||||
static bool s_bFrameStep = false;
|
static bool s_bFrameStep = false;
|
||||||
|
@ -53,8 +51,6 @@ static bool s_bReadOnly = true;
|
||||||
static u32 s_rerecords = 0;
|
static u32 s_rerecords = 0;
|
||||||
static PlayMode s_playMode = MODE_NONE;
|
static PlayMode s_playMode = MODE_NONE;
|
||||||
|
|
||||||
static u32 s_framesToSkip = 0, s_frameSkipCounter = 0;
|
|
||||||
|
|
||||||
static u8 s_numPads = 0;
|
static u8 s_numPads = 0;
|
||||||
static ControllerState s_padState;
|
static ControllerState s_padState;
|
||||||
static DTMHeader tmpHeader;
|
static DTMHeader tmpHeader;
|
||||||
|
@ -211,9 +207,6 @@ void FrameUpdate()
|
||||||
CPU::Break();
|
CPU::Break();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_framesToSkip)
|
|
||||||
FrameSkipping();
|
|
||||||
|
|
||||||
s_bPolled = false;
|
s_bPolled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +240,6 @@ void Init()
|
||||||
s_tickCountAtLastInput = 0;
|
s_tickCountAtLastInput = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_frameSkipCounter = s_framesToSkip;
|
|
||||||
memset(&s_padState, 0, sizeof(s_padState));
|
memset(&s_padState, 0, sizeof(s_padState));
|
||||||
if (!tmpHeader.bFromSaveState || !IsPlayingInput())
|
if (!tmpHeader.bFromSaveState || !IsPlayingInput())
|
||||||
Core::SetStateFileName("");
|
Core::SetStateFileName("");
|
||||||
|
@ -278,20 +270,6 @@ void InputUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Host Thread
|
|
||||||
void SetFrameSkipping(unsigned int framesToSkip)
|
|
||||||
{
|
|
||||||
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
|
||||||
|
|
||||||
s_framesToSkip = framesToSkip;
|
|
||||||
s_frameSkipCounter = 0;
|
|
||||||
|
|
||||||
// Don't forget to re-enable rendering in case it wasn't...
|
|
||||||
// as this won't be changed anymore when frameskip is turned off
|
|
||||||
if (framesToSkip == 0)
|
|
||||||
Fifo::SetRendering(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: CPU Thread
|
// NOTE: CPU Thread
|
||||||
void SetPolledDevice()
|
void SetPolledDevice()
|
||||||
{
|
{
|
||||||
|
@ -324,22 +302,6 @@ void SetReadOnly(bool bEnabled)
|
||||||
s_bReadOnly = bEnabled;
|
s_bReadOnly = bEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: GPU Thread
|
|
||||||
void FrameSkipping()
|
|
||||||
{
|
|
||||||
// Frameskipping will desync movie playback
|
|
||||||
if (!Core::g_want_determinism)
|
|
||||||
{
|
|
||||||
std::lock_guard<std::mutex> lk(cs_frameSkip);
|
|
||||||
|
|
||||||
s_frameSkipCounter++;
|
|
||||||
if (s_frameSkipCounter > s_framesToSkip || Core::ShouldSkipFrame(s_frameSkipCounter) == false)
|
|
||||||
s_frameSkipCounter = 0;
|
|
||||||
|
|
||||||
Fifo::SetRendering(!s_frameSkipCounter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsRecordingInput()
|
bool IsRecordingInput()
|
||||||
{
|
{
|
||||||
return (s_playMode == MODE_RECORDING);
|
return (s_playMode == MODE_RECORDING);
|
||||||
|
|
|
@ -158,9 +158,6 @@ void ChangeWiiPads(bool instantly = false);
|
||||||
void DoFrameStep();
|
void DoFrameStep();
|
||||||
void SetReadOnly(bool bEnabled);
|
void SetReadOnly(bool bEnabled);
|
||||||
|
|
||||||
void SetFrameSkipping(unsigned int framesToSkip);
|
|
||||||
void FrameSkipping();
|
|
||||||
|
|
||||||
bool BeginRecordingInput(int controllers);
|
bool BeginRecordingInput(int controllers);
|
||||||
void RecordInput(GCPadStatus* PadStatus, int controllerID);
|
void RecordInput(GCPadStatus* PadStatus, int controllerID);
|
||||||
void RecordWiimote(int wiimote, u8* data, u8 size);
|
void RecordWiimote(int wiimote, u8* data, u8 size);
|
||||||
|
|
|
@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
|
||||||
static std::thread g_save_thread;
|
static std::thread g_save_thread;
|
||||||
|
|
||||||
// Don't forget to increase this after doing changes on the savestate system
|
// Don't forget to increase this after doing changes on the savestate system
|
||||||
static const u32 STATE_VERSION = 62; // Last changed in PR 4195
|
static const u32 STATE_VERSION = 63; // Last changed in PR 4322
|
||||||
|
|
||||||
// Maps savestate versions to Dolphin versions.
|
// Maps savestate versions to Dolphin versions.
|
||||||
// Versions after 42 don't need to be added to this list,
|
// Versions after 42 don't need to be added to this list,
|
||||||
|
|
|
@ -307,7 +307,6 @@ EVT_MENU_RANGE(IDM_LOAD_SLOT_1, IDM_LOAD_SLOT_10, CFrame::OnLoadState)
|
||||||
EVT_MENU_RANGE(IDM_LOAD_LAST_1, IDM_LOAD_LAST_10, CFrame::OnLoadLastState)
|
EVT_MENU_RANGE(IDM_LOAD_LAST_1, IDM_LOAD_LAST_10, CFrame::OnLoadLastState)
|
||||||
EVT_MENU_RANGE(IDM_SAVE_SLOT_1, IDM_SAVE_SLOT_10, CFrame::OnSaveState)
|
EVT_MENU_RANGE(IDM_SAVE_SLOT_1, IDM_SAVE_SLOT_10, CFrame::OnSaveState)
|
||||||
EVT_MENU_RANGE(IDM_SELECT_SLOT_1, IDM_SELECT_SLOT_10, CFrame::OnSelectSlot)
|
EVT_MENU_RANGE(IDM_SELECT_SLOT_1, IDM_SELECT_SLOT_10, CFrame::OnSelectSlot)
|
||||||
EVT_MENU_RANGE(IDM_FRAME_SKIP_0, IDM_FRAME_SKIP_9, CFrame::OnFrameSkip)
|
|
||||||
EVT_MENU_RANGE(IDM_DRIVE1, IDM_DRIVE24, CFrame::OnBootDrive)
|
EVT_MENU_RANGE(IDM_DRIVE1, IDM_DRIVE24, CFrame::OnBootDrive)
|
||||||
EVT_MENU_RANGE(IDM_CONNECT_WIIMOTE1, IDM_CONNECT_BALANCEBOARD, CFrame::OnConnectWiimote)
|
EVT_MENU_RANGE(IDM_CONNECT_WIIMOTE1, IDM_CONNECT_BALANCEBOARD, CFrame::OnConnectWiimote)
|
||||||
EVT_MENU_RANGE(IDM_LIST_WAD, IDM_LIST_DRIVES, CFrame::GameListChanged)
|
EVT_MENU_RANGE(IDM_LIST_WAD, IDM_LIST_DRIVES, CFrame::GameListChanged)
|
||||||
|
|
|
@ -283,7 +283,6 @@ private:
|
||||||
void OnUndoLoadState(wxCommandEvent& event);
|
void OnUndoLoadState(wxCommandEvent& event);
|
||||||
void OnUndoSaveState(wxCommandEvent& event);
|
void OnUndoSaveState(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnFrameSkip(wxCommandEvent& event);
|
|
||||||
void OnFrameStep(wxCommandEvent& event);
|
void OnFrameStep(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnConfigMain(wxCommandEvent& event); // Options
|
void OnConfigMain(wxCommandEvent& event); // Options
|
||||||
|
|
|
@ -135,13 +135,6 @@ wxMenuBar* CFrame::CreateMenu()
|
||||||
emulationMenu->Append(IDM_TOGGLE_FULLSCREEN, GetMenuLabel(HK_FULLSCREEN));
|
emulationMenu->Append(IDM_TOGGLE_FULLSCREEN, GetMenuLabel(HK_FULLSCREEN));
|
||||||
emulationMenu->Append(IDM_FRAMESTEP, GetMenuLabel(HK_FRAME_ADVANCE), wxEmptyString);
|
emulationMenu->Append(IDM_FRAMESTEP, GetMenuLabel(HK_FRAME_ADVANCE), wxEmptyString);
|
||||||
|
|
||||||
wxMenu* skippingMenu = new wxMenu;
|
|
||||||
emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
|
|
||||||
for (int i = 0; i < 10; i++)
|
|
||||||
skippingMenu->AppendRadioItem(IDM_FRAME_SKIP_0 + i, wxString::Format("%i", i));
|
|
||||||
skippingMenu->Check(IDM_FRAME_SKIP_0 + SConfig::GetInstance().m_FrameSkip, true);
|
|
||||||
Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
|
|
||||||
|
|
||||||
emulationMenu->AppendSeparator();
|
emulationMenu->AppendSeparator();
|
||||||
emulationMenu->Append(IDM_SCREENSHOT, GetMenuLabel(HK_SCREENSHOT));
|
emulationMenu->Append(IDM_SCREENSHOT, GetMenuLabel(HK_SCREENSHOT));
|
||||||
|
|
||||||
|
@ -1643,14 +1636,6 @@ void CFrame::OnSaveState(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnFrameSkip(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
int amount = event.GetId() - IDM_FRAME_SKIP_0;
|
|
||||||
|
|
||||||
Movie::SetFrameSkipping((unsigned int)amount);
|
|
||||||
SConfig::GetInstance().m_FrameSkip = amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFrame::OnSelectSlot(wxCommandEvent& event)
|
void CFrame::OnSelectSlot(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
m_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
|
m_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
|
||||||
|
|
|
@ -73,16 +73,6 @@ enum
|
||||||
IDM_SELECT_SLOT_10,
|
IDM_SELECT_SLOT_10,
|
||||||
IDM_SAVE_SELECTED_SLOT,
|
IDM_SAVE_SELECTED_SLOT,
|
||||||
IDM_LOAD_SELECTED_SLOT,
|
IDM_LOAD_SELECTED_SLOT,
|
||||||
IDM_FRAME_SKIP_0,
|
|
||||||
IDM_FRAME_SKIP_1,
|
|
||||||
IDM_FRAME_SKIP_2,
|
|
||||||
IDM_FRAME_SKIP_3,
|
|
||||||
IDM_FRAME_SKIP_4,
|
|
||||||
IDM_FRAME_SKIP_5,
|
|
||||||
IDM_FRAME_SKIP_6,
|
|
||||||
IDM_FRAME_SKIP_7,
|
|
||||||
IDM_FRAME_SKIP_8,
|
|
||||||
IDM_FRAME_SKIP_9,
|
|
||||||
IDM_PLAY,
|
IDM_PLAY,
|
||||||
IDM_STOP,
|
IDM_STOP,
|
||||||
IDM_RESET,
|
IDM_RESET,
|
||||||
|
|
|
@ -749,8 +749,7 @@ bool Renderer::SaveScreenshot(const std::string& filename, const TargetRectangle
|
||||||
void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
const EFBRectangle& rc, float Gamma)
|
const EFBRectangle& rc, float Gamma)
|
||||||
{
|
{
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if ((!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||||
!fbWidth || !fbHeight)
|
|
||||||
{
|
{
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -692,8 +692,7 @@ bool Renderer::SaveScreenshot(const std::string& filename, const TargetRectangle
|
||||||
void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height,
|
void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height,
|
||||||
const EFBRectangle& rc, float gamma)
|
const EFBRectangle& rc, float gamma)
|
||||||
{
|
{
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if ((!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fb_width || !fb_height)
|
||||||
!fb_width || !fb_height)
|
|
||||||
{
|
{
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1350,8 +1350,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
glDisable(GL_DEBUG_OUTPUT);
|
glDisable(GL_DEBUG_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if ((!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||||
!fbWidth || !fbHeight)
|
|
||||||
{
|
{
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -192,21 +192,14 @@ void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char* nam
|
||||||
|
|
||||||
void OnObjectBegin()
|
void OnObjectBegin()
|
||||||
{
|
{
|
||||||
if (!Fifo::WillSkipCurrentFrame())
|
if (g_ActiveConfig.bDumpTextures && stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart &&
|
||||||
{
|
|
||||||
if (g_ActiveConfig.bDumpTextures &&
|
|
||||||
stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart &&
|
|
||||||
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd)
|
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd)
|
||||||
DumpActiveTextures();
|
DumpActiveTextures();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void OnObjectEnd()
|
void OnObjectEnd()
|
||||||
{
|
{
|
||||||
if (!Fifo::WillSkipCurrentFrame())
|
if (g_ActiveConfig.bDumpObjects && stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart &&
|
||||||
{
|
|
||||||
if (g_ActiveConfig.bDumpObjects &&
|
|
||||||
stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart &&
|
|
||||||
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd)
|
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd)
|
||||||
DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
||||||
stats.thisFrame.numDrawnObjects));
|
stats.thisFrame.numDrawnObjects));
|
||||||
|
@ -216,8 +209,8 @@ void OnObjectEnd()
|
||||||
if (DrawnToBuffer[i])
|
if (DrawnToBuffer[i])
|
||||||
{
|
{
|
||||||
DrawnToBuffer[i] = false;
|
DrawnToBuffer[i] = false;
|
||||||
std::string filename = StringFromFormat(
|
std::string filename =
|
||||||
"%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
StringFromFormat("%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
||||||
stats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]);
|
stats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]);
|
||||||
|
|
||||||
TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true);
|
TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true);
|
||||||
|
@ -228,4 +221,3 @@ void OnObjectEnd()
|
||||||
stats.thisFrame.numDrawnObjects++;
|
stats.thisFrame.numDrawnObjects++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ void CopyEfb()
|
||||||
rc.right = rc.left + (int)bpmem.copyTexSrcWH.x + 1;
|
rc.right = rc.left + (int)bpmem.copyTexSrcWH.x + 1;
|
||||||
rc.bottom = rc.top + (int)bpmem.copyTexSrcWH.y + 1;
|
rc.bottom = rc.top + (int)bpmem.copyTexSrcWH.y + 1;
|
||||||
|
|
||||||
if (!Fifo::WillSkipCurrentFrame())
|
|
||||||
{
|
|
||||||
if (bpmem.triggerEFBCopy.copy_to_xfb)
|
if (bpmem.triggerEFBCopy.copy_to_xfb)
|
||||||
{
|
{
|
||||||
float yScale;
|
float yScale;
|
||||||
|
@ -97,4 +95,3 @@ void CopyEfb()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -111,8 +111,6 @@ void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed* xfb, u32 fbWidt
|
||||||
// Called on the GPU thread
|
// Called on the GPU thread
|
||||||
void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
const EFBRectangle& rc, float Gamma)
|
const EFBRectangle& rc, float Gamma)
|
||||||
{
|
|
||||||
if (!Fifo::WillSkipCurrentFrame())
|
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bUseXFB)
|
if (g_ActiveConfig.bUseXFB)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +146,6 @@ void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
fbWidth, fbHeight, true);
|
fbWidth, fbHeight, true);
|
||||||
frame_index++;
|
frame_index++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
OSD::DoCallbacks(OSD::CallbackType::OnFrame);
|
OSD::DoCallbacks(OSD::CallbackType::OnFrame);
|
||||||
|
|
||||||
|
|
|
@ -380,9 +380,6 @@ static void BPWritten(const BPCmd& bp)
|
||||||
// -------------------------
|
// -------------------------
|
||||||
case BPMEM_CLEARBBOX1:
|
case BPMEM_CLEARBBOX1:
|
||||||
case BPMEM_CLEARBBOX2:
|
case BPMEM_CLEARBBOX2:
|
||||||
// Don't compute bounding box if this frame is being skipped!
|
|
||||||
// Wrong but valid values are better than bogus values...
|
|
||||||
if (!Fifo::WillSkipCurrentFrame())
|
|
||||||
{
|
{
|
||||||
u8 offset = bp.address & 2;
|
u8 offset = bp.address & 2;
|
||||||
BoundingBox::active = true;
|
BoundingBox::active = true;
|
||||||
|
|
|
@ -34,8 +34,6 @@ namespace Fifo
|
||||||
static constexpr u32 FIFO_SIZE = 2 * 1024 * 1024;
|
static constexpr u32 FIFO_SIZE = 2 * 1024 * 1024;
|
||||||
static constexpr int GPU_TIME_SLOT_SIZE = 1000;
|
static constexpr int GPU_TIME_SLOT_SIZE = 1000;
|
||||||
|
|
||||||
static bool s_skip_current_frame = false;
|
|
||||||
|
|
||||||
static Common::BlockingLoop s_gpu_mainloop;
|
static Common::BlockingLoop s_gpu_mainloop;
|
||||||
|
|
||||||
static Common::Flag s_emu_running_state;
|
static Common::Flag s_emu_running_state;
|
||||||
|
@ -86,7 +84,6 @@ void DoState(PointerWrap& p)
|
||||||
s_video_buffer_seen_ptr = s_video_buffer_pp_read_ptr = s_video_buffer_read_ptr;
|
s_video_buffer_seen_ptr = s_video_buffer_pp_read_ptr = s_video_buffer_read_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Do(s_skip_current_frame);
|
|
||||||
p.Do(s_sync_ticks);
|
p.Do(s_sync_ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,16 +127,6 @@ void Shutdown()
|
||||||
s_fifo_aux_read_ptr = nullptr;
|
s_fifo_aux_read_ptr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRendering(bool enabled)
|
|
||||||
{
|
|
||||||
s_skip_current_frame = !enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WillSkipCurrentFrame()
|
|
||||||
{
|
|
||||||
return s_skip_current_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
// May be executed from any thread, even the graphics thread.
|
// May be executed from any thread, even the graphics thread.
|
||||||
// Created to allow for self shutdown.
|
// Created to allow for self shutdown.
|
||||||
void ExitGpuLoop()
|
void ExitGpuLoop()
|
||||||
|
|
|
@ -44,7 +44,5 @@ void ExitGpuLoop();
|
||||||
void EmulatorState(bool running);
|
void EmulatorState(bool running);
|
||||||
bool AtBreakpoint();
|
bool AtBreakpoint();
|
||||||
void ResetVideoBuffer();
|
void ResetVideoBuffer();
|
||||||
void SetRendering(bool bEnabled);
|
|
||||||
bool WillSkipCurrentFrame();
|
|
||||||
|
|
||||||
} // namespace Fifo
|
} // namespace Fifo
|
||||||
|
|
|
@ -264,8 +264,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
|
||||||
u16 num_vertices = src.Read<u16>();
|
u16 num_vertices = src.Read<u16>();
|
||||||
int bytes = VertexLoaderManager::RunVertices(
|
int bytes = VertexLoaderManager::RunVertices(
|
||||||
cmd_byte & GX_VAT_MASK, // Vertex loader index (0 - 7)
|
cmd_byte & GX_VAT_MASK, // Vertex loader index (0 - 7)
|
||||||
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, num_vertices, src,
|
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, num_vertices, src, is_preprocess);
|
||||||
Fifo::WillSkipCurrentFrame(), is_preprocess);
|
|
||||||
|
|
||||||
if (bytes < 0)
|
if (bytes < 0)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
|
@ -180,8 +180,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
|
||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing,
|
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess)
|
||||||
bool is_preprocess)
|
|
||||||
{
|
{
|
||||||
if (!count)
|
if (!count)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -192,7 +191,7 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo
|
||||||
if ((int)src.size() < size)
|
if ((int)src.size() < size)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (skip_drawing || is_preprocess)
|
if (is_preprocess)
|
||||||
return size;
|
return size;
|
||||||
|
|
||||||
// If the native vertex format changed, force a flush.
|
// If the native vertex format changed, force a flush.
|
||||||
|
|
|
@ -27,8 +27,7 @@ void MarkAllDirty();
|
||||||
NativeVertexFormatMap* GetNativeVertexFormatMap();
|
NativeVertexFormatMap* GetNativeVertexFormatMap();
|
||||||
|
|
||||||
// Returns -1 if buf_size is insufficient, else the amount of bytes consumed
|
// Returns -1 if buf_size is insufficient, else the amount of bytes consumed
|
||||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing,
|
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess);
|
||||||
bool is_preprocess);
|
|
||||||
|
|
||||||
// For debugging
|
// For debugging
|
||||||
void AppendListToString(std::string* dest);
|
void AppendListToString(std::string* dest);
|
||||||
|
|
Loading…
Reference in New Issue