mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-26 12:16:20 +00: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:
parent
ab9f539233
commit
b066d51dfa
21 changed files with 336 additions and 303 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue