diff options
author | Eric Anholt <[email protected]> | 2020-01-13 13:06:01 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-01-14 13:29:13 -0800 |
commit | 1c8f3ca4a1392d947dac3d52b4fefda18ad44c9a (patch) | |
tree | ec90e11cf480fba1b66dfa9096074537689cb7ad | |
parent | 0ca67b73b2dd112833dbe0670e0a971b2bc1e78d (diff) |
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 <[email protected]>
Fixes: db2ae5112106 ("mesa: Skip partial InvalidateFramebuffer of packed depth/stencil.")
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>
(cherry picked from commit 3be4b89c038554ceb95ba24c00f50c0f2db3a646)
-rw-r--r-- | src/mesa/main/fbobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 2aeb48dfe7d..8aef23aeb84 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -4994,9 +4994,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 != |