Skip to content

Fix multi-planar texture copying#9069

Merged
Wumpf merged 2 commits intogfx-rs:trunkfrom
noituri:@noituri/fix-nv12-copy
Mar 1, 2026
Merged

Fix multi-planar texture copying#9069
Wumpf merged 2 commits intogfx-rs:trunkfrom
noituri:@noituri/fix-nv12-copy

Conversation

@noituri
Copy link
Contributor

@noituri noituri commented Feb 17, 2026

Connections
None

Description
Texture to texture copy didn't account for multi-planar textures which resulted in artifacts on linux-vulkan (windows-vulkan seems unaffected for some reason) and panic on DX12.

Testing
I made a simple app which renders a moving triangle onto NV12 texture and displays it (run on windows (dx12/vulkan) and linux (vulkan)).
I can also add tests to wgpu-gpu if you want me to.

Squash or Rebase?
squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@noituri noituri force-pushed the @noituri/fix-nv12-copy branch 2 times, most recently from f78ec44 to 4110b7c Compare February 17, 2026 15:31
@noituri noituri force-pushed the @noituri/fix-nv12-copy branch from 4110b7c to 437cfb3 Compare February 19, 2026 16:11
@Wumpf Wumpf self-requested a review February 21, 2026 19:59
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

Change looks good to me! But ...

I can also add tests to wgpu-gpu if you want me to.

yes, this definitely needs a test! :)

@noituri noituri force-pushed the @noituri/fix-nv12-copy branch from 437cfb3 to f501bf7 Compare February 23, 2026 12:51
@noituri noituri requested a review from Wumpf February 23, 2026 12:53
@noituri
Copy link
Contributor Author

noituri commented Feb 23, 2026

I added the tests. The invalid copy usage is caught by vulkan validation layers

@noituri noituri force-pushed the @noituri/fix-nv12-copy branch from f501bf7 to 9725225 Compare February 25, 2026 12:58
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

thanks!

@Wumpf Wumpf merged commit 665cb34 into gfx-rs:trunk Mar 1, 2026
56 checks passed
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.

2 participants