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

Freiling warmup memory #22984

Merged
merged 4 commits into from
Dec 10, 2020
Merged

Conversation

freiling
Copy link
Contributor

Description

This PR contains fixes for a number of issues that came up around shader warmup

  • Correctly handling the Embedder API ifdefs
  • Decouple Shader warmup from embedder API so they can be enabled independently
  • Reduce in flight memory usage to avoid OOM'ing the device
  • Fix a resource lifetime issue uncovered by the fix for the OOM

Tests

These issues are not within the scope of unit tests and need to be covered by an E2E integration test that runs on fuchsia infrastructure for the following reasons:

  • Embedder API not present in unit test harness
  • Memory pressure during testing is lower due to using beefier hardware and not running as much stuff
  • resource lifetime issue is covered by existing unittests now that the OOM fix is in

This fixes an issue with the shader warmup where gpu resources could end
up deleted before the gpu work that needed them was complete, leading to
GPU page faults. This was because although the sk_sp<SkSurface> will normally
keep resources alive throughout its lifetime, the SurfaceProducerSurface will
call VkDestroyMemory on the memory backing the SkSurface when it is deleted,
even if the SkSurface wrapping that VkMemory is still alive.

This change also deletes some related but unused code from
CompositorContext that I noticed while refactoring.
@freiling freiling requested a review from arbreng December 10, 2020 04:47
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla bot added the cla: yes label Dec 10, 2020
@freiling freiling merged commit 062cbd8 into flutter:master Dec 10, 2020
@freiling
Copy link
Contributor Author

oh wait i just realized this wasnt reviewed im gonna figure out how to revert

freiling added a commit to freiling/engine that referenced this pull request Dec 10, 2020
@freiling
Copy link
Contributor Author

revert: #23007

freiling added a commit that referenced this pull request Dec 10, 2020
@freiling freiling mentioned this pull request Dec 10, 2020
@freiling
Copy link
Contributor Author

New PR: #23009

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2020
dnfield pushed a commit to flutter/flutter that referenced this pull request Dec 11, 2020
* 3a30ae3 Fix ios voiceover (for safari >13.4) (flutter/engine#22965)

* 4338849 Replace g_object_weak_ref with g_object_add_weak_pointer

* 3b9937a Load macOS dart bundle by URL fallback (flutter/engine#22979)

* 96927bb add ffi_struct_patch.dart to libraries.yaml (flutter/engine#23000)

* 2efc7c1 Set SkPath::setIsVolatile based on whether the path survives at least two frames (flutter/engine#22620)

* bb81b95 Allow Tile mode for blur filter and add new decal TileMode (flutter/engine#22982)

* 9df2157 Load iOS dart bundle by URL fallback (flutter/engine#22997)

* 7647fdb Roll Skia from 22f80a60b17f to 6b07e0eb497c (26 revisions) (flutter/engine#23005)

* 062cbd8 Freiling warmup memory (flutter/engine#22984)

* 1646966 Revert "Freiling warmup memory (#22984)" (flutter/engine#23007)

* 50d830a [web] Do not reset 'cursor' in PersistedPlatformView. (flutter/engine#22977)

* 6ebf5c3 Roll Dart SDK from e4c9b06267d3 to a4e6fe145bf7 (2 revisions) (flutter/engine#23006)

* 14c8c24 [web] Fix regression in foreground style (flutter/engine#22999)

* 6678efa Implement SystemSound.play

* fb769a4 Roll Fuchsia Linux SDK from rnN_X2o75... to ESzmO-yOF... (flutter/engine#23010)

* b424356 Roll Skia from 6b07e0eb497c to f7cce2b243b2 (6 revisions) (flutter/engine#23018)

* 56035c7 Roll Fuchsia Linux SDK from ESzmO-yOF... to K4cPd0-Xd... (flutter/engine#23020)

* cb4a2ef Roll Skia from f7cce2b243b2 to b0cb8372c1ef (3 revisions) (flutter/engine#23021)

* cc8c9d4 Roll Skia from b0cb8372c1ef to 5284e96599a8 (2 revisions) (flutter/engine#23023)

* 8e9a943 Roll Dart SDK from a4e6fe145bf7 to c287db6bf232 (2 revisions) (flutter/engine#23024)

* 714b543 Roll Fuchsia Mac SDK from OUQEzH1oE... to a9yuHfriB... (flutter/engine#23025)

* d50cdda Roll Dart SDK from c287db6bf232 to 2553a84fe438 (1 revision) (flutter/engine#23026)

* 4794d04 Roll Skia from 5284e96599a8 to f7fdf1aa2911 (1 revision) (flutter/engine#23027)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant