Skip to content

Fix image copy regressions#8022

Merged
teoxoy merged 3 commits intogfx-rs:trunkfrom
andyleiserson:image-copy
Jul 30, 2025
Merged

Fix image copy regressions#8022
teoxoy merged 3 commits intogfx-rs:trunkfrom
andyleiserson:image-copy

Conversation

@andyleiserson
Copy link
Contributor

@andyleiserson andyleiserson commented Jul 29, 2025

This fixes two things:

  • A regression introduced by Additional validation of buffer-texture copies #7948 with non-4B-aligned copies. However, allowing this makes it possible to reach a panic in initialize_buffer_memory if the copy requires initializing a region of memory that is not 4B aligned. I do not see that panic in Firefox crash reports, so allowing the unaligned copies to maintain the cases where they do work seems like the right tradeoff.
  • A regression from Additional validation of texture copies #7935 with multi-layer depth/stencil copies.

Testing
Enables some of the CTS tests that regressed in Firefox, although others still have platform-dependent failures that I believe existed prior to the regression.

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.

This fixes a regression introduced by gfx-rs#7948. However, it makes it
possible to reach a panic in initialize_buffer_memory if the copy
requires initializing a region of memory that is not 4B aligned.
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

LGTM

@teoxoy teoxoy merged commit 36ae215 into gfx-rs:trunk Jul 30, 2025
40 checks passed
@andyleiserson andyleiserson deleted the image-copy branch July 30, 2025 15:45
sharmajai pushed a commit to sharmajai/wgpu that referenced this pull request Oct 12, 2025
* Restore allowance of unaligned buffer-texture copies

This fixes a regression introduced by gfx-rs#7948. However, it makes it
possible to reach a panic in initialize_buffer_memory if the copy
requires initializing a region of memory that is not 4B aligned.

* Fix CopyT2T of multi-layer depth/stencil textures

* Adjust test list
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