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

@ -12,7 +12,6 @@
namespace Vulkan
{
class StateTracker;
class StreamBuffer;
class VertexManager : public VertexManagerBase
@ -21,7 +20,9 @@ public:
VertexManager();
~VertexManager();
bool Initialize(StateTracker* state_tracker);
static VertexManager* GetInstance();
bool Initialize();
NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
@ -32,8 +33,6 @@ protected:
private:
void vFlush(bool use_dst_alpha) override;
StateTracker* m_state_tracker = nullptr;
std::vector<u8> m_cpu_vertex_buffer;
std::vector<u16> m_cpu_index_buffer;