This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] have Hostbuffer write directly to block allocated device buffers. #49505
Merged
auto-submit
merged 24 commits into
flutter-team-archive:main
from
jonahwilliams:write_to_device_buffer
Jan 10, 2024
Merged
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
340ebdd
[Impeller] have Hostbuffer write directly to block allocated device b…
2cef26c
more adjustments.
2f04349
flush work.
88d7b95
++
9ddcacd
++
9f896fb
oofta
5a82b6e
move test file.
723cc9b
Merge branch 'main' of github.com:flutter/engine into write_to_device…
fefb257
reset transients in playground.
3ab6e0f
GLES buffer starts out dirty.
7dd9854
++
8c06294
cleanups, make flush work for GLES.
65dda4b
fix const.
b0d6e59
Add more unittests
e1b8d5d
Merge branch 'main' of github.com:flutter/engine into write_to_device…
ad16416
include array
9d4867e
fix flutter GPU.
b132dd7
fix fixtures.
5a553f1
fix enable vk validations.
d4a32ed
fix tests and numerous off by ones.
2ccdb59
attempt to reset only on render frames.
809adf5
++
ac12014
add flag to aiks_context::Render to conditionally reset host buffers.
3b1cbc5
Merge branch 'main' into write_to_device_buffer
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |||
| #include <unordered_map> | ||||
| #include "flutter/fml/macros.h" | ||||
| #include "impeller/base/backend_cast.h" | ||||
| #include "impeller/core/host_buffer.h" | ||||
| #include "impeller/renderer/backend/gles/allocator_gles.h" | ||||
| #include "impeller/renderer/backend/gles/capabilities_gles.h" | ||||
| #include "impeller/renderer/backend/gles/gpu_tracer_gles.h" | ||||
|
|
@@ -52,6 +53,7 @@ class ContextGLES final : public Context, | |||
| std::shared_ptr<SamplerLibraryGLES> sampler_library_; | ||||
| std::shared_ptr<AllocatorGLES> resource_allocator_; | ||||
| std::shared_ptr<GPUTracerGLES> gpu_tracer_; | ||||
| std::shared_ptr<HostBuffer> host_buffer_; | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||
|
|
||||
| // Note: This is stored separately from the ProcTableGLES CapabilitiesGLES | ||||
| // in order to satisfy the Context::GetCapabilities signature which returns | ||||
|
|
@@ -88,6 +90,9 @@ class ContextGLES final : public Context, | |||
| // |Context| | ||||
| const std::shared_ptr<const Capabilities>& GetCapabilities() const override; | ||||
|
|
||||
| // |Context| | ||||
| const std::shared_ptr<HostBuffer> GetTransientsBuffer() const override; | ||||
|
|
||||
| // |Context| | ||||
| void Shutdown() override; | ||||
|
|
||||
|
|
||||
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
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -83,6 +83,9 @@ class ContextMTL final : public Context, | |||
| // |Context| | ||||
| const std::shared_ptr<const Capabilities>& GetCapabilities() const override; | ||||
|
|
||||
| // |Context| | ||||
| const std::shared_ptr<HostBuffer> GetTransientsBuffer() const override; | ||||
|
|
||||
| void SetCapabilities(const std::shared_ptr<const Capabilities>& capabilities); | ||||
|
|
||||
| // |Context| | ||||
|
|
@@ -129,6 +132,7 @@ class ContextMTL final : public Context, | |||
| #endif // IMPELLER_DEBUG | ||||
| std::deque<std::function<void()>> tasks_awaiting_gpu_; | ||||
| std::unique_ptr<SyncSwitchObserver> sync_switch_observer_; | ||||
| std::shared_ptr<HostBuffer> host_buffer_; | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||
| bool is_valid_ = false; | ||||
|
|
||||
| ContextMTL( | ||||
|
|
||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done