GPU: Make VRAM a global object

This commit is contained in:
Stenzek
2023-12-23 16:53:15 +10:00
parent 7340324ed9
commit 411213d6a0
10 changed files with 50 additions and 69 deletions

View File

@ -11,6 +11,7 @@
#include "common/bitfield.h"
#include "common/fifo_queue.h"
#include "common/rectangle.h"
#include "common/types.h"
#include <algorithm>
#include <array>
@ -359,9 +360,6 @@ protected:
std::unique_ptr<TimingEvent> m_crtc_tick_event;
std::unique_ptr<TimingEvent> m_command_tick_event;
// Pointer to VRAM, used for reads/writes. In the hardware backends, this is the shadow buffer.
u16* m_vram_ptr = nullptr;
union GPUSTAT
{
u32 bits;
@ -651,3 +649,4 @@ private:
};
extern std::unique_ptr<GPU> g_gpu;
extern u16 g_vram[VRAM_SIZE / sizeof(u16)];