Repository navigation
Conversation
|
This pull request targets the Please change the base branch of this pull request to |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
`RenderTarget::IsValid()` states that a render target must have a color attachment at index zero, and `RenderPassMTL` checks it in its constructor. `RenderPassVK` did not. It read color attachment zero — which `GetColorAttachment(0)` hands back default-constructed, with a null texture, when the target has none — and dereferenced that texture while working out the pass's sample count. A depth-only render target is how an application reaches this: a shadow map drawn through flutter_gpu is the ordinary case. On Metal the same program gets `Failed to begin RenderPass` and can carry on; on Vulkan the process died with SIGSEGV inside libflutter, with nothing reported to Dart and nothing for the caller to catch. This adds the same check the Metal backend makes, so both refuse such a target the same way, and a regression test that crashes without it.
dzolotov
force-pushed
the
fix/vulkan-render-pass-null-color-attachment-main
branch
from
September 10, 2026 13:16
4bd6d38 to
8015b9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RenderTarget::IsValid()states that a render target must have a colorattachment at index zero, and
RenderPassMTLchecks it in its constructor.RenderPassVKdid not: it read color attachment zero — whichGetColorAttachment(0)hands back default-constructed, with a null texture,when the target has none — and dereferenced that texture while working out the
pass's sample count.
A depth-only render target is how an application reaches this from
flutter_gpu; a shadow map is the ordinary case. On Metal such a target produces
Failed to begin RenderPass, which Dart can catch; on Vulkan the process diedwith SIGSEGV inside libflutter, with nothing reported to Dart.
This adds the same check the Metal backend makes, so the two backends refuse
the target the same way.
Where it was verified. At engine revision
5f77625673248ee5846fbcaf5d3e1a3878386fd7— the one the 3.47.0 SDK ships —because that is the engine the crashing device runs. No commit between that
revision and
maintouches either file, so the change applies tomainunchanged; CI is what checks it there.
Verification. The added test,
RenderPassVK.RefusesATargetWithNoColorAttachment,segfaults on the unpatched engine and passes with the change
(
out/host_debug/impeller_unittests --gtest_filter='RenderPassVK.*', 3/3). Ondevice — Samsung Galaxy A55, Android 16, Impeller Vulkan — a Flutter app that
begins such a pass is killed before the change and receives
Exception: Failed to begin RenderPassafter it, matching macOS/Metal.Fixes #192535
Pre-launch Checklist
///).