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

hal: switch texture copies to expect physical sizes #1908

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented Sep 6, 2021

Connections
Fixes #1895

Description
Currently, wgpu-core expects physical sizes for texture copies, but wgpu-hal expects virtual.
Moreover, Metal texture-texture copies already expect physical (but not buffer-related copies), which wasn't handled properly.

This PR fixes Metal properly and aligns wgpu-hal copy API with wgpu-core.

Testing
Tested the examples on metal. Can confirm the "skybox" example no longer throws a validation error on Metal, at least.

@kvark kvark requested a review from cwfitzgerald September 6, 2021 04:02
@kvark kvark force-pushed the tex-size branch 5 times, most recently from 62a17a3 to 2dab02a Compare September 7, 2021 02:09
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Code looks fine -- not as bad as I had feared. I have a code reuse comment, but other than that we're good.

wgpu-hal/src/gles/command.rs Outdated Show resolved Hide resolved
wgpu-hal/src/metal/conv.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/command.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/conv.rs Outdated Show resolved Hide resolved
@kvark
Copy link
Member Author

kvark commented Sep 7, 2021

Cleaned up now, and it looks a bit better. Thanks for the review!

@kvark kvark enabled auto-merge (squash) September 7, 2021 03:35
@kvark kvark merged commit 076031c into gfx-rs:master Sep 7, 2021
@kvark kvark deleted the tex-size branch September 7, 2021 13:47
@kvark kvark added the PR: needs back-porting PR with a fix that needs to land on crates label Sep 8, 2021
kvark added a commit to kvark/wgpu that referenced this pull request Sep 8, 2021
@kvark
Copy link
Member Author

kvark commented Sep 8, 2021

published in wgpu-hal-0.10.4

@kvark kvark removed the PR: needs back-porting PR with a fix that needs to land on crates label Sep 8, 2021
cwfitzgerald pushed a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wgpu-hal Uses Virtual Sizes for Compressed Texture Copies Instead of Physical Sizes
2 participants