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

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jul 20, 2023

Without this bit, we're holding it wrong. From the docs:

VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer. If this flag is not set on a pool, then vkResetCommandBuffer must not be called for any command buffer allocated from that pool.

This means our reset calls later are getting ignored.

Fixes flutter/flutter#131001

Without this bit, we're holding it wrong. From the docs:

> VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer. If this flag is not set on a pool, then vkResetCommandBuffer must not be called for any command buffer allocated from that pool.

This means our reset calls later are getting ignored.

Fixes flutter/flutter#131001
@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 (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

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

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2023
@chinmaygarde
Copy link
Member

Derp. My bad.

I should clarify that we still never reset the command buffers. We just destroy them which I presume resets them.

It might also be a good idea to trim the pool from time to time. Perhaps after a frame workload so these sizes stay under control over a long period of time.

@dnfield
Copy link
Contributor Author

dnfield commented Jul 20, 2023

Derp. My bad.

I should clarify that we still never reset the command buffers. We just destroy them which I presume resets them.

Yes, the RAII wrapper resets them.

It might also be a good idea to trim the pool from time to time. Perhaps after a frame workload so these sizes stay under control over a long period of time.

SGTM.

@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 20, 2023

auto label is removed for flutter/engine, pr: 43867, due to - The status or check suite Mac mac_clang_tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux linux_clang_tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2023
@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2023
@auto-submit auto-submit bot merged commit b5a6b1c into flutter:main Jul 20, 2023
harryterkelsen pushed a commit to harryterkelsen/engine that referenced this pull request Jul 20, 2023
…lutter#43867)

Without this bit, we're holding it wrong. From the docs:

> VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer. If this flag is not set on a pool, then vkResetCommandBuffer must not be called for any command buffer allocated from that pool.

This means our reset calls later are getting ignored.

Fixes flutter/flutter#131001
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 21, 2023
@dnfield dnfield deleted the vk_validation branch July 21, 2023 05:26
@chinmaygarde
Copy link
Member

Filed flutter/flutter#131033 to followup on the pool trimming.

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

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

[Impeller] Simple program on Android Vulkan backend fails to release graphics memory, eventually crashes

3 participants