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

Conversation

@jonahwilliams
Copy link
Contributor

The Vulkan command buffer wrapper delegates almost all of its functionality to the "CommandEncoderVK". I did not find that this separation was useful, as they have a 1-1 relationship and an identical lifecycle. Lets combine them to reduce the number of things to worry about.

if (auto command_buffer = GetCommandBuffer()) {
command_buffer.insertDebugUtilsLabelEXT(label_info);
}
if (queue_) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBD: what was this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Asking because if I remove this, the command buffer no longer needs a reference to the queue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I was inserting the same marker in both the queue for the buffer for ease of debugging. But AFAICT, having the marker (push-pop) in the buffer is sufficient. This complicates other things like reset. So let's get rid of it.

@jonahwilliams jonahwilliams marked this pull request as ready for review October 7, 2024 16:13
@jonahwilliams
Copy link
Contributor Author

Need to update to remove queue reference.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 7, 2024
@auto-submit auto-submit bot merged commit 14b7e28 into flutter:main Oct 7, 2024
31 checks passed
@jonahwilliams jonahwilliams deleted the color_contents branch October 7, 2024 19:54
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I like the refactor, just a few notes.

for (const std::shared_ptr<CommandBuffer>& buffer : buffers) {
auto encoder = CommandBufferVK::Cast(*buffer).GetEncoder();
if (!encoder->EndCommandBuffer()) {
CommandBufferVK& command_buffer = CommandBufferVK::Cast(*buffer);
Copy link
Member

Choose a reason for hiding this comment

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

This should be CommandBufferVK*. We are discarding the fact that this can be null.

~CommandBufferVK() override;

const std::shared_ptr<CommandEncoderVK>& GetEncoder();
// Encoder Functionality
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Encoder Functionality

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 7, 2024
…156364)

flutter/engine@e84e303...427302e

2024-10-07 30870216+gaaclarke@users.noreply.github.com Speculative fix for memory issues related to retrying image decompression (flutter/engine#55704)
2024-10-07 jonahwilliams@google.com [Impeller] disable surface control on API 29. (flutter/engine#55708)
2024-10-07 jonahwilliams@google.com [Impeller] remove Vulkan command encoder abstraction, use command buffer vk. (flutter/engine#55680)

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 matanl@google.com,zra@google.com 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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…fer vk. (flutter/engine#55680)

The Vulkan command buffer wrapper delegates almost all of its functionality to the "CommandEncoderVK". I did not find that this separation was useful, as they have a 1-1 relationship and an identical lifecycle. Lets combine them to reduce the number of things to worry about.
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 platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants