mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Fifo: Make g_bSkipCurrentFrame a TU-local variable
This is only ever queried, making it a global isn't necessary.
This commit is contained in:
@ -380,7 +380,7 @@ static void BPWritten(const BPCmd& bp)
|
||||
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::g_bSkipCurrentFrame)
|
||||
if (!Fifo::WillSkipCurrentFrame())
|
||||
{
|
||||
u8 offset = bp.address & 2;
|
||||
BoundingBox::active = true;
|
||||
|
@ -33,7 +33,7 @@ namespace Fifo
|
||||
|
||||
static constexpr u32 FIFO_SIZE = 2 * 1024 * 1024;
|
||||
|
||||
bool g_bSkipCurrentFrame = false;
|
||||
static bool s_skip_current_frame = false;
|
||||
|
||||
static Common::BlockingLoop s_gpu_mainloop;
|
||||
|
||||
@ -82,7 +82,8 @@ void DoState(PointerWrap &p)
|
||||
// We're good and paused, right?
|
||||
s_video_buffer_seen_ptr = s_video_buffer_pp_read_ptr = s_video_buffer_read_ptr;
|
||||
}
|
||||
p.Do(g_bSkipCurrentFrame);
|
||||
|
||||
p.Do(s_skip_current_frame);
|
||||
p.Do(s_last_sync_gpu_tick);
|
||||
}
|
||||
|
||||
@ -129,7 +130,12 @@ void Shutdown()
|
||||
|
||||
void SetRendering(bool enabled)
|
||||
{
|
||||
g_bSkipCurrentFrame = !enabled;
|
||||
s_skip_current_frame = !enabled;
|
||||
}
|
||||
|
||||
bool WillSkipCurrentFrame()
|
||||
{
|
||||
return s_skip_current_frame;
|
||||
}
|
||||
|
||||
// May be executed from any thread, even the graphics thread.
|
||||
|
@ -13,8 +13,6 @@ class PointerWrap;
|
||||
namespace Fifo
|
||||
{
|
||||
|
||||
extern bool g_bSkipCurrentFrame;
|
||||
|
||||
// This could be in SConfig, but it depends on multiple settings
|
||||
// and can change at runtime.
|
||||
extern bool g_use_deterministic_gpu_thread;
|
||||
@ -53,5 +51,6 @@ void EmulatorState(bool running);
|
||||
bool AtBreakpoint();
|
||||
void ResetVideoBuffer();
|
||||
void SetRendering(bool bEnabled);
|
||||
bool WillSkipCurrentFrame();
|
||||
|
||||
};
|
||||
} // namespace Fifo
|
||||
|
@ -277,7 +277,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
|
||||
(cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT,
|
||||
num_vertices,
|
||||
src,
|
||||
Fifo::g_bSkipCurrentFrame,
|
||||
Fifo::WillSkipCurrentFrame(),
|
||||
is_preprocess);
|
||||
|
||||
if (bytes < 0)
|
||||
|
Reference in New Issue
Block a user