mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Perf] (MG_Backend/DirectGLES): Remove binding state protectors.
This commit is contained in:
@@ -27,66 +27,18 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
};
|
||||
} // namespace DebugImpl
|
||||
|
||||
namespace BufferImpl {
|
||||
class BackendBufferBindingProtector {
|
||||
public:
|
||||
BackendBufferBindingProtector(GLenum target);
|
||||
|
||||
~BackendBufferBindingProtector();
|
||||
|
||||
private:
|
||||
GLenum m_target;
|
||||
GLint m_previousBinding = 0;
|
||||
};
|
||||
} // namespace BufferImpl
|
||||
namespace BufferImpl {} // namespace BufferImpl
|
||||
|
||||
namespace VertexArrayImpl {
|
||||
GLenum GetBindingQuery(GLenum target, bool isTexture);
|
||||
|
||||
class BackendVertexArrayBindingProtector {
|
||||
public:
|
||||
BackendVertexArrayBindingProtector();
|
||||
|
||||
~BackendVertexArrayBindingProtector();
|
||||
|
||||
private:
|
||||
GLint m_previousBinding = 0;
|
||||
};
|
||||
} // namespace VertexArrayImpl
|
||||
|
||||
namespace TextureImpl {
|
||||
class BackendTextureBindingProtector {
|
||||
public:
|
||||
BackendTextureBindingProtector(GLenum target);
|
||||
|
||||
~BackendTextureBindingProtector();
|
||||
|
||||
private:
|
||||
GLenum m_target;
|
||||
GLint m_previousBinding = 0;
|
||||
};
|
||||
|
||||
void GenerateTextureFormatInfo(TextureInternalFormat internalFormat, GLenum* outInternalFormat,
|
||||
GLenum* outFormat, GLenum* outType);
|
||||
} // namespace TextureImpl
|
||||
|
||||
namespace FramebufferImpl {
|
||||
class BackendFramebufferBindingProtector {
|
||||
public:
|
||||
BackendFramebufferBindingProtector(GLenum target);
|
||||
|
||||
~BackendFramebufferBindingProtector();
|
||||
|
||||
static GLuint GetTempFBO(FramebufferTarget target);
|
||||
static void BindTempFBO(FramebufferTarget target);
|
||||
|
||||
private:
|
||||
GLenum m_target;
|
||||
GLint m_previousBinding = 0;
|
||||
inline static GLuint s_tempReadFBO = 0;
|
||||
inline static GLuint s_tempDrawFBO = 0;
|
||||
};
|
||||
} // namespace FramebufferImpl
|
||||
namespace FramebufferImpl {} // namespace FramebufferImpl
|
||||
|
||||
namespace PrgramImpl {
|
||||
String ProcessOutColorLocations(const String& glslCode);
|
||||
|
||||
Reference in New Issue
Block a user