VideoCommon: remove Cache Displaylist

This option was known to break every second game and only boost a bit.
It also seems to be broken because of streaming into pinned memory and buffer storage buffers.

v2: also remove dlc_desc
This commit is contained in:
degasus
2014-01-31 07:30:55 +01:00
parent 72cc6431e5
commit 010a0d481a
24 changed files with 4 additions and 931 deletions
@@ -91,7 +91,6 @@ public final class UserPreferences
editor.putString("externalFrameBuffer", "Real");
}
editor.putBoolean("cacheDisplayLists", getConfig("gfx_opengl.ini", "Hacks", "DlistCachingEnable", "False").equals("True"));
editor.putBoolean("disableDestinationAlpha", getConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", "False").equals("True"));
editor.putBoolean("fastDepthCalculation", getConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", "True").equals("True"));
@@ -234,7 +233,6 @@ public final class UserPreferences
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "UseRealXFB", "True");
}
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "DlistCachingEnable", dlistCachingEnabled ? "True" : "False");
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", disableDstAlphaPass ? "True" : "False");
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", useFastDepthCalc ? "True" : "False");
@@ -117,7 +117,6 @@ wxString use_ffv1_desc = wxTRANSLATE("Encode frame dumps using the FFV1 codec.\n
#endif
wxString free_look_desc = wxTRANSLATE("This feature allows you to change the game's camera.\nMove the mouse while holding the right mouse button to pan and while holding the middle button to move.\nHold SHIFT and press one of the WASD keys to move the camera by a certain step distance (SHIFT+0 to move faster and SHIFT+9 to move slower). Press SHIFT+R to reset the camera.\n\nIf unsure, leave this unchecked.");
wxString crop_desc = wxTRANSLATE("Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.\n\nIf unsure, leave this unchecked.");
wxString dlc_desc = wxTRANSLATE("[EXPERIMENTAL]\nSpeeds up emulation a bit by caching display lists.\nPossibly causes issues though.\n\nIf unsure, leave this unchecked.");
wxString omp_desc = wxTRANSLATE("Use multiple threads to decode textures.\nMight result in a speedup (especially on CPUs with more than two cores).\n\nIf unsure, leave this unchecked.");
wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect after finishing a frame.\n\nIf unsure, select (off).");
wxString cache_efb_copies_desc = wxTRANSLATE("Slightly speeds up EFB to RAM copies by sacrificing emulation accuracy.\nSometimes also increases visual quality.\nIf you're experiencing any issues, try raising texture cache accuracy or disable this option.\n\nIf unsure, leave this unchecked.");
@@ -495,7 +494,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// - other hacks
{
wxGridSizer* const szr_other = new wxGridSizer(2, 5, 5);
szr_other->Add(CreateCheckBox(page_hacks, _("Cache Display Lists"), wxGetTranslation(dlc_desc), vconfig.bDlistCachingEnable));
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Destination Alpha"), wxGetTranslation(disable_dstalpha_desc), vconfig.bDstAlphaPass));
szr_other->Add(CreateCheckBox(page_hacks, _("OpenMP Texture Decoder"), wxGetTranslation(omp_desc), vconfig.bOMPDecoder));
szr_other->Add(CreateCheckBox(page_hacks, _("Fast Depth Calculation"), wxGetTranslation(fast_depth_calc_desc), vconfig.bFastDepthCalc));
-2
View File
@@ -8,7 +8,6 @@
#include "Timer.h"
#include "Debugger.h"
#include "DLCache.h"
#include "EmuWindow.h"
#include "Fifo.h"
#include "OnScreenDisplay.h"
@@ -950,7 +949,6 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r
GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);
DLCache::ProgressiveCleanup();
TextureCache::Cleanup();
// Enable configuration changes
-3
View File
@@ -20,7 +20,6 @@
#include "Host.h"
#include "Debugger/DebuggerPanel.h"
#include "DLCache.h"
#include "EmuWindow.h"
#include "IndexGenerator.h"
#include "FileUtil.h"
@@ -201,7 +200,6 @@ void VideoBackend::Video_Prepare()
PixelShaderManager::Init();
CommandProcessor::Init();
PixelEngine::Init();
DLCache::Init();
// Tell the host that the window is ready
Host_Message(WM_USER_CREATE);
@@ -219,7 +217,6 @@ void VideoBackend::Shutdown()
s_swapRequested = FALSE;
// VideoCommon
DLCache::Shutdown();
Fifo_Shutdown();
CommandProcessor::Shutdown();
PixelShaderManager::Shutdown();
-2
View File
@@ -33,7 +33,6 @@
#include "TextureCache.h"
#include "RasterFont.h"
#include "VertexShaderGen.h"
#include "DLCache.h"
#include "ProgramShaderCache.h"
#include "VertexShaderManager.h"
#include "VertexLoaderManager.h"
@@ -1588,7 +1587,6 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r
}
// Clean out old stuff from caches. It's not worth it to clean out the shader caches.
DLCache::ProgressiveCleanup();
TextureCache::Cleanup();
frameCount++;
-7
View File
@@ -76,7 +76,6 @@ Make AA apply instantly during gameplay if possible
#include "TextureConverter.h"
#include "PostProcessing.h"
#include "OnScreenDisplay.h"
#include "DLCache.h"
#include "FramebufferManager.h"
#include "Core.h"
#include "Host.h"
@@ -225,9 +224,6 @@ void VideoBackend::Video_Prepare()
GL_REPORT_ERRORD();
VertexLoaderManager::Init();
TextureConverter::Init();
#ifndef _M_GENERIC
DLCache::Init();
#endif
// Notify the core that the video backend is ready
Host_Message(WM_USER_CREATE);
@@ -250,9 +246,6 @@ void VideoBackend::Video_Cleanup() {
s_efbAccessRequested = false;
s_FifoShuttingDown = false;
s_swapRequested = false;
#ifndef _M_GENERIC
DLCache::Shutdown();
#endif
Fifo_Shutdown();
// The following calls are NOT Thread Safe
+2 -4
View File
@@ -40,11 +40,9 @@ set(SRCS BPFunctions.cpp
set(LIBS core png)
if(NOT _M_GENERIC)
set(SRCS ${SRCS} TextureDecoder_x64.cpp
DLCache_x64.cpp)
set(SRCS ${SRCS} TextureDecoder_x64.cpp)
else()
set(SRCS ${SRCS} TextureDecoder_Generic.cpp
DLCache_Generic.cpp)
set(SRCS ${SRCS} TextureDecoder_Generic.cpp)
endif()
if(NOT ${CL} STREQUAL CL-NOTFOUND)
list(APPEND LIBS ${CL})
@@ -17,7 +17,6 @@
#include "HW/ProcessorInterface.h"
#include "HW/GPFifo.h"
#include "HW/Memmap.h"
#include "DLCache.h"
#include "HW/SystemTimers.h"
#include "Core.h"
@@ -409,7 +408,6 @@ void Write16(const u16 _Value, const u32 _Address)
{
ResetVideoBuffer();
}
IncrementCheckContextId();
DEBUG_LOG(COMMANDPROCESSOR,"Try to write to FIFO_RW_DISTANCE_HI : %04x", _Value);
break;
case FIFO_RW_DISTANCE_LO:
@@ -527,7 +525,6 @@ void SetCpStatus(bool isCPUThread)
{
INFO_LOG(COMMANDPROCESSOR, "Hit breakpoint at %i", fifo.CPReadPointer);
fifo.bFF_Breakpoint = true;
IncrementCheckContextId();
}
}
else
-20
View File
@@ -1,20 +0,0 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _DLCACHE_H
#define _DLCACHE_H
bool HandleDisplayList(u32 address, u32 size);
void IncrementCheckContextId();
namespace DLCache {
void Init();
void Shutdown();
void ProgressiveCleanup();
void Clear();
} // namespace
#endif // _DLCACHE_H
@@ -1,52 +0,0 @@
// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
// TODO: Handle cache-is-full condition :p
#include "Common.h"
#include "DLCache.h"
namespace DLCache
{
void Init()
{
}
void Shutdown()
{
}
void Clear()
{
}
void ProgressiveCleanup()
{
}
} // namespace
// NOTE - outside the namespace on purpose.
bool HandleDisplayList(u32 address, u32 size)
{
return false;
}
void IncrementCheckContextId()
{
}
File diff suppressed because it is too large Load Diff
+1 -10
View File
@@ -112,15 +112,6 @@ void InterpretDisplayList(u32 address, u32 size)
g_pVideoData = old_pVideoData;
}
// Defer to backend-specific DL cache.
extern bool HandleDisplayList(u32 address, u32 size);
void ExecuteDisplayList(u32 address, u32 size)
{
if (!HandleDisplayList(address, size))
InterpretDisplayList(address, size);
}
u32 FifoCommandRunnable(u32 &command_size)
{
u32 cycleTime = 0;
@@ -337,7 +328,7 @@ static void Decode()
{
u32 address = DataReadU32();
u32 count = DataReadU32();
ExecuteDisplayList(address, count);
InterpretDisplayList(address, count);
}
break;
+1 -1
View File
@@ -38,5 +38,5 @@ extern bool g_bRecordFifoData;
void OpcodeDecoder_Init();
void OpcodeDecoder_Shutdown();
u32 OpcodeDecoder_Run(bool skipped_frame);
void ExecuteDisplayList(u32 address, u32 size);
void InterpretDisplayList(u32 address, u32 size);
#endif // _OPCODE_DECODING_H
-4
View File
@@ -17,7 +17,6 @@
#include "RenderBase.h"
#include "CommandProcessor.h"
#include "HW/ProcessorInterface.h"
#include "DLCache.h"
#include "State.h"
namespace PixelEngine
@@ -380,7 +379,6 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate)
UpdateInterrupts();
}
CommandProcessor::interruptTokenWaiting = false;
IncrementCheckContextId();
}
void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
@@ -402,7 +400,6 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
CommandProcessor::interruptTokenWaiting = true;
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
IncrementCheckContextId();
}
// SetFinish
@@ -412,7 +409,6 @@ void SetFinish()
CommandProcessor::interruptFinishWaiting = true;
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetFinishOnMainThread, 0);
INFO_LOG(PIXELENGINE, "VIDEO Set Finish");
IncrementCheckContextId();
}
//This function is used in CommandProcessor when write CTRL_REGISTER and the new fifo is attached.
-9
View File
@@ -59,7 +59,6 @@ int Renderer::s_LastEFBScale;
bool Renderer::s_skipSwap;
bool Renderer::XFBWrited;
bool Renderer::s_EnableDLCachingAfterRecording;
unsigned int Renderer::prev_efb_format = (unsigned int)-1;
unsigned int Renderer::efb_scale_numeratorX = 1;
@@ -490,19 +489,11 @@ void Renderer::CheckFifoRecording()
{
if (!wasRecording)
{
// Disable display list caching because the recorder does not handle it
s_EnableDLCachingAfterRecording = g_ActiveConfig.bDlistCachingEnable;
g_ActiveConfig.bDlistCachingEnable = false;
RecordVideoMemory();
}
FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase, CommandProcessor::fifo.CPEnd);
}
else if (wasRecording)
{
g_ActiveConfig.bDlistCachingEnable = s_EnableDLCachingAfterRecording;
}
}
void Renderer::RecordVideoMemory()
-2
View File
@@ -151,8 +151,6 @@ protected:
static bool s_skipSwap;
static bool XFBWrited;
static bool s_EnableDLCachingAfterRecording;
private:
static unsigned int prev_efb_format;
static unsigned int efb_scale_numeratorX;
-11
View File
@@ -915,17 +915,6 @@ void VertexLoader::ConvertVertices ( int count )
#endif
}
void VertexLoader::RunCompiledVertices(int vtx_attr_group, int primitive, int const count, u8* Data)
{
auto const new_count = SetupRunVertices(vtx_attr_group, primitive, count);
memcpy_gc(VertexManager::s_pCurBufferPointer, Data, native_stride * new_count);
VertexManager::s_pCurBufferPointer += native_stride * new_count;
DataSkip(new_count * m_VertexSize);
VertexManager::AddVertices(primitive, new_count);
}
void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
{
VAT vat;
-1
View File
@@ -97,7 +97,6 @@ public:
int SetupRunVertices(int vtx_attr_group, int primitive, int const count);
void RunVertices(int vtx_attr_group, int primitive, int count);
void RunCompiledVertices(int vtx_attr_group, int primitive, int count, u8* Data);
// For debugging / profiling
void AppendToString(std::string *dest) const;
@@ -127,14 +127,6 @@ void RunVertices(int vtx_attr_group, int primitive, int count)
g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
}
void RunCompiledVertices(int vtx_attr_group, int primitive, int count, u8* Data)
{
if (!count || !Data)
return;
RefreshLoader(vtx_attr_group);
g_VertexLoaders[vtx_attr_group]->RunCompiledVertices(vtx_attr_group, primitive, count,Data);
}
int GetVertexSize(int vtx_attr_group)
{
RefreshLoader(vtx_attr_group);
@@ -17,7 +17,6 @@ namespace VertexLoaderManager
int GetVertexSize(int vtx_attr_group);
void RunVertices(int vtx_attr_group, int primitive, int count);
void RunCompiledVertices(int vtx_attr_group, int primitive, int count, u8* Data);
// For debugging
void AppendListToString(std::string *dest);

Some files were not shown because too many files have changed in this diff Show More