Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick 6da1a8953313 from angle #37708

Merged
merged 1 commit into from Mar 27, 2023

Conversation

ppontes
Copy link
Member

@ppontes ppontes commented Mar 25, 2023

M110: Vulkan: Don't close render pass if rebind to same fbo

In the Vulkan backend, the render pass can occasionally (and
transiently) be in a state of "open but inactive". This is when the
render pass is closed, but has the potential for future modifications
(for example to add a resolve attachment). Under many circumstances, it
is expected that an open render pass cannot be in such a state.

This assumption can be broken in this scenario:

  • Open render pass, draw, etc
  • Change framebuffer binding
  • Change framebuffer binding back to original
  • Masked Clear

When ContextVk is synced before clear, it sees that the framebuffer
binding is changed (though it hasn't really), and it closes the render
passes and sets the render pass dirty bit. If a draw were to follow, a
new render pass would have started (unnecessarily). However, in the
case of a masked clear, UtilsVk notices that the render pass is started,
assumes it must be active, and continues recording to it. While the
operation itself succeeds, the assumption that the render pass is active
is false (and fails assertion).

This change makes sure that framebuffer binding change is no-oped if the
framebuffer is the same one that has opened the current render pass. If
any application does unnecessary binding changes and back, it will be
optimized by this change as well.

Bug: chromium:1411210
Change-Id: I37a3a9f2eaa1a81a1b3393840b9458ec71a87377
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4261215
Reviewed-by: Charlie Lao cclao@google.com
Commit-Queue: Shahbaz Youssefi syoussefi@chromium.org
(cherry picked from commit 05e62f39412e8c6bfc98582f5e7a49041991c97b)
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4296296
Commit-Queue: Geoff Lang geofflang@chromium.org
Reviewed-by: Prudhvikumar Bommana pbommana@google.com
Commit-Queue: Prudhvikumar Bommana pbommana@google.com

Notes: Security: backported fix for CVE-2023-1213.

@ppontes ppontes requested a review from a team as a code owner March 25, 2023 00:55
@ppontes ppontes added security 🔒 semver/patch backwards-compatible bug fixes backport-check-skip Skip trop's backport validity checking 23-x-y labels Mar 25, 2023
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours and removed new-pr 🌱 PR opened in the last 24 hours labels Mar 25, 2023
@ppontes ppontes force-pushed the cherry-pick/23-x-y/angle/6da1a8953313 branch from f0b5e81 to 24ba194 Compare March 25, 2023 00:57
@jkleinsc jkleinsc merged commit 6da4c2f into 23-x-y Mar 27, 2023
9 checks passed
@jkleinsc jkleinsc deleted the cherry-pick/23-x-y/angle/6da1a8953313 branch March 27, 2023 13:53
@release-clerk
Copy link

release-clerk bot commented Mar 27, 2023

Release Notes Persisted

Security: backported fix for CVE-2023-1213.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
23-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants