Mesa (master): mesa: Fix detection of invalidating both depth and stencil.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 13 23:56:21 UTC 2020


Module: Mesa
Branch: master
Commit: 3be4b89c038554ceb95ba24c00f50c0f2db3a646
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3be4b89c038554ceb95ba24c00f50c0f2db3a646

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 13 13:06:01 2020 -0800

mesa: Fix detection of invalidating both depth and stencil.

Fixes an extra 1024x1024x4 MSAA Z/S store on WebGL fishtank on cheza.

Reported-by: Dave Airlie <airlied at redhat.com>
Fixes: db2ae5112106 ("mesa: Skip partial InvalidateFramebuffer of packed depth/stencil.")
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>

---

 src/mesa/main/fbobject.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index ea89565cfe2..a34d5099688 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -5070,9 +5070,10 @@ discard_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
                                 GL_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT);
          bool has_both = false;
          for (int j = 0; j < numAttachments; j++) {
-            if (attachments[j] == other_format)
+            if (attachments[j] == other_format) {
                has_both = true;
-            break;
+               break;
+            }
          }
 
          if (fb->Attachment[BUFFER_DEPTH].Renderbuffer !=



More information about the mesa-commit mailing list