core: remove unused Metal RendererBackend state-cache methods (#4519)

This commit is contained in:
Yul Kang
2026-08-25 16:10:14 +09:00
committed by GitHub
parent ef5ff9ac01
commit 96afb98b7f
10 changed files with 0 additions and 75 deletions

View File

@@ -17,16 +17,12 @@ class ProgramParameters;
namespace mtl {
using ProcAddress = void (*)();
using FramebufferID = uint32_t;
class RendererBackend : public gfx::RendererBackend {
public:
RendererBackend(gfx::ContextMode);
~RendererBackend() override;
/// Called prior to rendering to update the internally assumed MetalMetal state.
virtual void updateAssumedState() = 0;
/// One-time shader initialization
void initShaders(gfx::ShaderRegistry&, const ProgramParameters& programParameters) override;
@@ -40,26 +36,6 @@ protected:
/// Reads the color pixel data from the currently bound framebuffer.
PremultipliedImage readFramebuffer(const Size&);
/// A constant to signal that a framebuffer is bound, but with an unknown ID.
static constexpr const FramebufferID ImplicitFramebufferBinding = std::numeric_limits<FramebufferID>::max();
/// Tells the renderer that the Metal state has already been set by the windowing toolkit.
/// It sets the internal assumed state to the supplied values.
void assumeFramebufferBinding(FramebufferID fbo);
void assumeViewport(int32_t x, int32_t y, const Size&);
void assumeScissorTest(bool);
/// Returns true when assumed framebuffer binding hasn't changed from the implicit binding.
bool implicitFramebufferBound();
public:
/// Triggers a Metal state update if the internal assumed state doesn't
/// match the supplied values.
void setFramebufferBinding(FramebufferID fbo);
void setViewport(int32_t x, int32_t y, const Size&);
void setScissorTest(bool);
protected:
MTLDevicePtr device;
MTLCommandQueuePtr commandQueue;
bool baseVertexInstanceDrawingSupported = false;