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

@ -24,8 +24,12 @@ class VertexFormat;
class StateTracker
{
public:
StateTracker();
~StateTracker();
StateTracker() = default;
~StateTracker() = default;
static StateTracker* GetInstance();
static bool CreateInstance();
static void DestroyInstance();
const RasterizationState& GetRasterizationState() const
{
@ -108,6 +112,8 @@ public:
bool IsWithinRenderArea(s32 x, s32 y, u32 width, u32 height) const;
private:
bool Initialize();
// Check that the specified viewport is within the render area.
// If not, ends the render pass if it is a clear render pass.
bool IsViewportWithinRenderArea() const;