mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
OGL: only create stencil buffer when needed
This commit is contained in:
@ -63,7 +63,8 @@ struct XFBSource : public XFBSourceBase
|
||||
class FramebufferManager : public FramebufferManagerBase
|
||||
{
|
||||
public:
|
||||
FramebufferManager(int targetWidth, int targetHeight, int msaaSamples);
|
||||
FramebufferManager(int targetWidth, int targetHeight, int msaaSamples,
|
||||
bool enable_stencil_buffer);
|
||||
~FramebufferManager();
|
||||
|
||||
// To get the EFB in texture form, these functions may have to transfer
|
||||
@ -101,11 +102,13 @@ public:
|
||||
static void ReinterpretPixelData(unsigned int convtype);
|
||||
|
||||
static void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points);
|
||||
static bool HasStencilBuffer();
|
||||
|
||||
private:
|
||||
GLuint CreateTexture(GLenum texture_type, GLenum internal_format, GLenum pixel_format,
|
||||
GLenum data_type);
|
||||
void BindLayeredTexture(GLuint texture, const std::vector<GLuint>& framebuffers, GLenum attachment, GLenum texture_type);
|
||||
void BindLayeredTexture(GLuint texture, const std::vector<GLuint>& framebuffers,
|
||||
GLenum attachment, GLenum texture_type);
|
||||
std::unique_ptr<XFBSourceBase> CreateXFBSource(unsigned int target_width,
|
||||
unsigned int target_height,
|
||||
unsigned int layers) override;
|
||||
@ -126,6 +129,8 @@ private:
|
||||
static GLuint
|
||||
m_efbColorSwap; // will be hot swapped with m_efbColor when reinterpreting EFB pixel formats
|
||||
|
||||
static bool m_enable_stencil_buffer;
|
||||
|
||||
// Only used in MSAA mode, TODO: try to avoid them
|
||||
static std::vector<GLuint> m_resolvedFramebuffer;
|
||||
static GLuint m_resolvedColorTexture;
|
||||
|
Reference in New Issue
Block a user