Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

If the RenderTargetCache::Create methods reuse a cached RenderTarget as is, then the returned RenderTarget may contain AttachmentConfig parameters that do not match the ones passed to the create method.

This PR instead creates a new RenderTarget based on the existing textures from the cached RenderTarget.

…onfigs when reusing cached render target textures

If the RenderTargetCache::Create methods reuse a cached RenderTarget
as is, then the returned RenderTarget may contain AttachmentConfig
parameters that do not match the ones passed to the create method.

This PR instead creates a new RenderTarget based on the existing
textures from the cached RenderTarget.
auto depth = render_target_data.render_target.GetDepthAttachment();
return RenderTargetAllocator::CreateOffscreen(
context, size, mip_count, label, color_attachment_config,
stencil_attachment_config, color0.texture, depth->texture);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is getting flagged as unchecked optional usage, since depth may not be defined - but that should be OK if you default depth.texture to nullptr

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but not to CI)

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 6, 2024
@auto-submit auto-submit bot merged commit 792bfc7 into flutter:main Mar 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 6, 2024
…tachment configs when reusing cached render target textures (flutter/engine#51208)
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 6, 2024
…144710)

flutter/engine@20037e3...44405ae

2024-03-06 [email protected] [Impeller] Append fewer redundant points when bridging triangle strips between contours. (flutter/engine#51232)
2024-03-06 [email protected] [Impeller] Apply padding for alignment when doing HostBuffer::Emplace with a callback (flutter/engine#51221)
2024-03-06 [email protected] [Impeller] Create a new render target with the specified attachment configs when reusing cached render target textures (flutter/engine#51208)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants