mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Vulkan: Remove parameters/members of single-instance classes
There's not a lot of point in passing these around or storing them (texture cache/state tracker mainly) as there will only ever be a single instance of the class. Also adds downcast helpers such as Vulkan::Renderer::GetInstance().
This commit is contained in:
@ -15,7 +15,6 @@
|
||||
namespace Vulkan
|
||||
{
|
||||
class StagingBuffer;
|
||||
class StateTracker;
|
||||
|
||||
class BoundingBox
|
||||
{
|
||||
@ -28,16 +27,16 @@ public:
|
||||
VkBuffer GetGPUBuffer() const { return m_gpu_buffer; }
|
||||
VkDeviceSize GetGPUBufferOffset() const { return 0; }
|
||||
VkDeviceSize GetGPUBufferSize() const { return BUFFER_SIZE; }
|
||||
s32 Get(StateTracker* state_tracker, size_t index);
|
||||
void Set(StateTracker* state_tracker, size_t index, s32 value);
|
||||
s32 Get(size_t index);
|
||||
void Set(size_t index, s32 value);
|
||||
|
||||
void Invalidate(StateTracker* state_tracker);
|
||||
void Flush(StateTracker* state_tracker);
|
||||
void Invalidate();
|
||||
void Flush();
|
||||
|
||||
private:
|
||||
bool CreateGPUBuffer();
|
||||
bool CreateReadbackBuffer();
|
||||
void Readback(StateTracker* state_tracker);
|
||||
void Readback();
|
||||
|
||||
VkBuffer m_gpu_buffer = VK_NULL_HANDLE;
|
||||
VkDeviceMemory m_gpu_memory = VK_NULL_HANDLE;
|
||||
|
Reference in New Issue
Block a user