Skip to content

Test for use of staging buffer in writeTexture #7963

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 3 commits into from
Jul 17, 2025

Conversation

andyleiserson
Copy link
Contributor

Test a writeTexture operation that will use the staging buffer. This fails if run under the address sanitizer without the fix for #7893. (Running under asan requires the test enumeration change from #7940.)

Fixes #7894

Testing
Verified regression test fails without the associated fix.

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.

@andyleiserson andyleiserson requested a review from a team as a code owner July 17, 2025 18:28
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.

Nice! Asan support would be cool - is there a good primer on getting that set up, would be nice to run CI under ASAN

@@ -1,5 +1,6 @@
//! Tests for texture copy

use wgpu::wgt;
Copy link
Member

Choose a reason for hiding this comment

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

nit, all important things are re-exported from wgpu - here you should do use wgpu::*

@andyleiserson
Copy link
Contributor Author

I used this command to run the gpu-tests suite with asan:

RUSTFLAGS="-Z sanitizer=address" cargo +nightly nextest run -Z build-std -p wgpu-test --target aarch64-apple-darwin

I also tried the CTS CI test list. The only thing I found from either is the stack trace I posted to the metal null pointer issue, which it sounds like may not be specific to asan.

@cwfitzgerald
Copy link
Member

Nice - I might see if I can get that rolling in CI

@cwfitzgerald cwfitzgerald merged commit 5d14f33 into gfx-rs:trunk Jul 17, 2025
40 checks passed
@andyleiserson andyleiserson deleted the staging-buffer-test branch July 17, 2025 23:07
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.

Tests for staging buffer layout not matching source layout in Queue.writeTexture
2 participants