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] Allocate images into host buffer, blit to device private texture. #40410
Merged
auto-submit
merged 17 commits into
flutter:main
from
jonahwilliams:blit_to_private_texture
Mar 21, 2023
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1d6fc76
[impeller] allocate images into host buffer, blit to device private t…
a8b8aff
Merge branch 'master' of github.com:flutter/engine into blit_to_priva…
3127b22
fix resized images
e82b763
Fix tests, update to use buffer view
252f053
Remove lossy texture compression
76b151f
++
5fbc677
++
5658ada
update gn
c73a0d7
++
b5d86ef
fix bitmap
c4513c4
++
e6c9fb0
Merge branch 'master' of github.com:flutter/engine into blit_to_priva…
c1fb18a
move it?
bead252
split impl
70c77fd
Merge branch 'master' of github.com:flutter/engine into blit_to_priva…
a77137d
clang tidy
02f905b
Merge branch 'main' into blit_to_private_texture
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -205,6 +205,7 @@ static MTLStorageMode ToMTLStorageMode(StorageMode mode, | |
|
|
||
| mtl_texture_desc.storageMode = ToMTLStorageMode( | ||
| desc.storage_mode, supports_memoryless_targets_, supports_uma_); | ||
|
|
||
| if (@available(macOS 12.5, ios 15.0, *)) { | ||
|
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. TODO: make configurable, figure out if it has reasonable behavior for image textures |
||
| if (desc.compression_type == CompressionType::kLossy && | ||
| SupportsLossyTextureCompression(device_)) { | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| #pragma once | ||
|
|
||
| #include "flutter/fml/macros.h" | ||
| #include "flutter/impeller/base/config.h" | ||
| #include "impeller/renderer/backend/vulkan/blit_command_vk.h" | ||
| #include "impeller/renderer/blit_pass.h" | ||
|
|
||
|
|
@@ -50,6 +51,15 @@ class BlitPassVK final : public BlitPass { | |
| size_t destination_offset, | ||
| std::string label) override; | ||
|
|
||
| // |BlitPass| | ||
| bool OnCopyBufferToTextureCommand(BufferView source, | ||
| std::shared_ptr<Texture> destination, | ||
| IPoint destination_origin, | ||
| std::string label) override { | ||
| IMPELLER_UNIMPLEMENTED; | ||
| return false; | ||
|
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. TODO
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. No problem. I'll handle it. But again, FML_UNIMPLEMENTED so its easier to grep for more than anything else.
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 |
||
| } | ||
|
|
||
| // |BlitPass| | ||
| bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture, | ||
| std::string label) 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
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
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.
TODO
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.
Totally fine. But
IMPELLER_UNIMPLEMENTEDin//impeller/base/config.hThere 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