GS/OpenGL: Fix fb target conflict without fbfetch

This commit is contained in:
Connor McLaughlin 2022-03-27 12:58:05 +10:00 committed by refractionpcsx2
parent 3a7f82eb66
commit d3aace98ac
2 changed files with 3 additions and 9 deletions

View File

@ -1653,14 +1653,9 @@ void GSDeviceOGL::OMAttachDs(GSTextureOGL* ds)
if (GLState::ds != id)
{
GLState::ds = id;
if (ds && ds->IsDss())
{
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, id, 0);
}
else
{
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, id, 0);
}
const GLenum target = GLLoader::found_framebuffer_fetch ? GL_DEPTH_ATTACHMENT : GL_DEPTH_STENCIL_ATTACHMENT;
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, target, GL_TEXTURE_2D, id, 0);
}
}

View File

@ -71,7 +71,6 @@ public:
void Swap(GSTexture* tex) final;
GSMap Read(const GSVector4i& r, AlignedBuffer<u8, 32>& buffer);
bool IsDss() { return (m_type == Type::DepthStencil || m_type == Type::SparseDepthStencil) && !GLLoader::found_framebuffer_fetch; }
bool IsDepth() { return (m_type == Type::DepthStencil || m_type == Type::SparseDepthStencil); }
bool IsIntegerFormat() const
{