Skip to content
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

[wgpu-core] Make the StagingBuffer implementation more robust #5946

Merged
merged 8 commits into from
Jul 12, 2024

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Jul 12, 2024

Makes the StagingBuffer implementation more robust and uses of it more consistent.

PR doesn't need to be squashed, each commit builds by itself.

@teoxoy teoxoy requested a review from a team as a code owner July 12, 2024 13:03
teoxoy added 4 commits July 12, 2024 15:15
It's already documented that to unmap a buffer it has to have been mapped.
Vulkan was the only backend that was returning an OOM on missing `Buffer.block` but `Buffer.map_buffer` already returns an error in this case.
@teoxoy teoxoy force-pushed the refactor-staging-buffer branch from 07b250c to 4c2ee69 Compare July 12, 2024 13:16
Copy link
Contributor

@nical nical left a comment

Choose a reason for hiding this comment

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

Nice!

@teoxoy teoxoy merged commit 6f16ea4 into gfx-rs:trunk Jul 12, 2024
27 checks passed
@teoxoy teoxoy deleted the refactor-staging-buffer branch July 12, 2024 14:34
@teoxoy teoxoy self-assigned this Jul 15, 2024
teoxoy added a commit to teoxoy/wgpu that referenced this pull request Jul 17, 2024
The size of the given `data` might be less than the size of the staging buffer.
This issue became apparent with the refactor in 6f16ea4 (gfx-rs#5946) since there is now an assert in `StagingBuffer.write()`.

Ruffle ran into this in gfx-rs#3193 (comment).
cwfitzgerald pushed a commit that referenced this pull request Jul 17, 2024
The size of the given `data` might be less than the size of the staging buffer.
This issue became apparent with the refactor in 6f16ea4 (#5946) since there is now an assert in `StagingBuffer.write()`.

Ruffle ran into this in #3193 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants