mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 19:55:50 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue