mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 03:14:34 +01:00
GLES: Add dependency tracking for render passes.
Let's try to invalidate when it's possible. We move the invalidate to the end of the render when detected.
This commit is contained in:
1 parent
32a7e7345e
commit
a36239473d
9 files changed
+104
-68
No files matched your search
@@ -827,13 +827,15 @@ void GLQueueRunner::PerformRenderPass(const GLRStep &step) {
|
||||
{
|
||||
GLenum attachments[3];
|
||||
int count = 0;
|
||||
bool hasDepth = step.render.framebuffer ? step.render.framebuffer->z_stencil_ : false;
|
||||
if (c.clear.clearMask & GL_COLOR_BUFFER_BIT)
|
||||
attachments[count++] = GL_COLOR_ATTACHMENT0;
|
||||
if (c.clear.clearMask & GL_DEPTH_BUFFER_BIT)
|
||||
if (hasDepth && (c.clear.clearMask & GL_DEPTH_BUFFER_BIT))
|
||||
attachments[count++] = GL_DEPTH_ATTACHMENT;
|
||||
if (c.clear.clearMask & GL_STENCIL_BUFFER_BIT)
|
||||
if (hasDepth && (c.clear.clearMask & GL_STENCIL_BUFFER_BIT))
|
||||
attachments[count++] = GL_STENCIL_BUFFER_BIT;
|
||||
glInvalidateFramebuffer(GL_FRAMEBUFFER, count, attachments);
|
||||
if (glInvalidateFramebuffer != nullptr && count != 0)
|
||||
glInvalidateFramebuffer(GL_FRAMEBUFFER, count, attachments);
|
||||
CHECK_GL_ERROR_IF_DEBUG();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user