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:
Stenzek
2016-10-22 20:50:36 +10:00
parent ab9f539233
commit b066d51dfa
21 changed files with 336 additions and 303 deletions

View File

@ -14,7 +14,6 @@
namespace Vulkan
{
class StagingBuffer;
class StateTracker;
class PerfQuery : public PerfQueryBase
{
@ -22,7 +21,9 @@ public:
PerfQuery();
~PerfQuery();
bool Initialize(StateTracker* state_tracker);
static PerfQuery* GetInstance();
bool Initialize();
void EnableQuery(PerfQueryGroup type) override;
void DisableQuery(PerfQueryGroup type) override;
@ -52,8 +53,6 @@ private:
void NonBlockingPartialFlush();
void BlockingPartialFlush();
StateTracker* m_state_tracker = nullptr;
// when testing in SMS: 64 was too small, 128 was ok
// TODO: This should be size_t, but the base class uses u32s
using PerfQueryDataType = u32;