8000 Switch to block-based stage-pool for Vulkan by anishmgoyal · Pull Request #8742 · google/filament · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Switch to block-based stage-pool for Vulkan #8742

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

Merged
merged 5 commits into from
Jun 5, 2025

Conversation

anishmgoyal
Copy link
Contributor

Instead of allocating a staging buffer every time one is needed, allocate a large (8mb) block of memory, and divvy it up as needed. We will make this configurable in the future, to allow for tuning for different apps as needed.

Copy link
Contributor
@phoenixxxx phoenixxxx left a comment

Choose a reason for hiding this comment

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

As we discussed offline, there will be a technical implementation document inbound for this feature for future reference.

@anishmgoyal anishmgoyal force-pushed the updateVulkanStagePool branch from 3ac97a6 to dcc20fc Compare June 3, 2025 18:34
@anishmgoyal anishmgoyal force-pushed the updateVulkanStagePool branch from dcc20fc to 4e55931 Compare June 4, 2025 16:01
Instead of allocating a staging buffer every time one is needed,
allocate a large (8mb) block of memory, and divvy it up as needed.
We will make this configurable in the future, to allow for tuning
for different apps as needed.
Instead of having the child block be a unique_ptr that we create a
separate container for within the command buffers, just have the
stage block segments be fvkmemory::Resource instances.
- As per discussion with @poweifeng, change the name of a variable
  called "stage" to "stageSegment" for clarity
- As per discussion with @rafadevai, change the order of terminate
  calls in VulkanDriver to better reflect cleanup order of some
  objects.
In order to prevent flushing more atoms than were modified when writing
data to host-mapped memory in a staging buffer, ensure that all segments
allocated are aligned to nonCoherentAtomSize.

Also - fix merge conflict compile errors.
@anishmgoyal anishmgoyal force-pushed the updateVulkanStagePool branch from 4e55931 to d8517e0 Compare June 4, 2025 17:28
@poweifeng poweifeng added the internal Issue/PR does not affect clients label Jun 4, 2025
@phoenixxxx phoenixxxx merged commit 88a06ec into google:main Jun 5, 2025
11 of 12 checks passed
@anishmgoyal anishmgoyal deleted the updateVulkanStagePool branch June 6, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0