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:
@ -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;
|
||||
|
Reference in New Issue
Block a user