GS/OpenGL: Fix fb target conflict without fbfetch

This commit is contained in:
Connor McLaughlin authored and refractionpcsx2 committed 2022-03-27 04:33:20 +01:00
1 parent 3a7f82eb66
commit d3aace98ac
2 files changed
+3 -9

No files matched your search

+3 -8
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);
}
}
-1
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
{