mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Remove Frameskip
This commit is contained in:
@ -380,19 +380,16 @@ static void BPWritten(const BPCmd& bp)
|
||||
// -------------------------
|
||||
case BPMEM_CLEARBBOX1:
|
||||
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;
|
||||
BoundingBox::active = true;
|
||||
{
|
||||
u8 offset = bp.address & 2;
|
||||
BoundingBox::active = true;
|
||||
|
||||
if (g_ActiveConfig.backend_info.bSupportsBBox && g_ActiveConfig.bBBoxEnable)
|
||||
{
|
||||
g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff);
|
||||
g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10);
|
||||
}
|
||||
if (g_ActiveConfig.backend_info.bSupportsBBox && g_ActiveConfig.bBBoxEnable)
|
||||
{
|
||||
g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff);
|
||||
g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10);
|
||||
}
|
||||
}
|
||||
return;
|
||||
case BPMEM_TEXINVALIDATE:
|
||||
// TODO: Needs some restructuring in TextureCacheBase.
|
||||
|
@ -34,8 +34,6 @@ namespace Fifo
|
||||
static constexpr u32 FIFO_SIZE = 2 * 1024 * 1024;
|
||||
static constexpr int GPU_TIME_SLOT_SIZE = 1000;
|
||||
|
||||
static bool s_skip_current_frame = false;
|
||||
|
||||
static Common::BlockingLoop s_gpu_mainloop;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
p.Do(s_skip_current_frame);
|
||||
p.Do(s_sync_ticks);
|
||||
}
|
||||
|
||||
@ -130,16 +127,6 @@ void Shutdown()
|
||||
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.
|
||||
// Created to allow for self shutdown.
|
||||
void ExitGpuLoop()
|
||||
|
@ -44,7 +44,5 @@ void ExitGpuLoop();
|
||||
void EmulatorState(bool running);
|
||||
bool AtBreakpoint();
|
||||
void ResetVideoBuffer();
|
||||
void SetRendering(bool bEnabled);
|
||||
bool WillSkipCurrentFrame();
|
||||
|
||||
} // namespace Fifo
|
||||
|
@ -264,8 +264,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
|
||||
u16 num_vertices = src.Read<u16>();
|
||||
int bytes = VertexLoaderManager::RunVertices(
|
||||
cmd_byte & GX_VAT_MASK, // Vertex loader index (0 - 7)
|
||||
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, num_vertices, src,
|
||||
Fifo::WillSkipCurrentFrame(), is_preprocess);
|
||||
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, num_vertices, src, is_preprocess);
|
||||
|
||||
if (bytes < 0)
|
||||
goto end;
|
||||
|
@ -180,8 +180,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
|
||||
return loader;
|
||||
}
|
||||
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing,
|
||||
bool is_preprocess)
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess)
|
||||
{
|
||||
if (!count)
|
||||
return 0;
|
||||
@ -192,7 +191,7 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo
|
||||
if ((int)src.size() < size)
|
||||
return -1;
|
||||
|
||||
if (skip_drawing || is_preprocess)
|
||||
if (is_preprocess)
|
||||
return size;
|
||||
|
||||
// If the native vertex format changed, force a flush.
|
||||
|
@ -27,8 +27,7 @@ void MarkAllDirty();
|
||||
NativeVertexFormatMap* GetNativeVertexFormatMap();
|
||||
|
||||
// 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,
|
||||
bool is_preprocess);
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess);
|
||||
|
||||
// For debugging
|
||||
void AppendListToString(std::string* dest);
|
||||
|
Reference in New Issue
Block a user