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

Test and doc tweaks #3149

Merged
merged 3 commits into from
Nov 2, 2022
Merged

Conversation

Imberflur
Copy link
Contributor

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
This fixes a bug I noticed in a test I added in a previous PR: see this comment #3023 (comment)

Description
Instead of using panics to catch validation errors, the buffer usage test now uses error scopes. This is more amenable to not re-creating the whole context for each test case that is intended to fail.

This PR also modifies the docs of Feature::MAPPABLE_PRIMARY_BUFFER to indicate that it is only available on Vulkan, DX12, and Metal.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2022

Codecov Report

Merging #3149 (a073980) into master (c453397) will decrease coverage by 0.68%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3149      +/-   ##
==========================================
- Coverage   65.41%   64.73%   -0.69%     
==========================================
  Files          81       81              
  Lines       38763    38737      -26     
==========================================
- Hits        25358    25076     -282     
- Misses      13405    13661     +256     
Impacted Files Coverage Δ
wgpu-types/src/lib.rs 88.04% <ø> (ø)
wgpu-core/src/track/texture.rs 60.18% <0.00%> (-20.66%) ⬇️
wgpu-core/src/track/buffer.rs 85.38% <0.00%> (-11.52%) ⬇️
wgpu-core/src/hub.rs 60.67% <0.00%> (-0.16%) ⬇️
wgpu-core/src/validation.rs 58.87% <0.00%> (-0.08%) ⬇️
wgpu-core/src/track/mod.rs 77.24% <0.00%> (+0.51%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

Small nit, then g2g

wgpu/tests/buffer_usages.rs Outdated Show resolved Hide resolved
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.

Great!

@cwfitzgerald cwfitzgerald enabled auto-merge (rebase) November 2, 2022 05:50
@cwfitzgerald cwfitzgerald merged commit 8a7240c into gfx-rs:master Nov 2, 2022
@Imberflur Imberflur deleted the test-and-doc-tweaks branch November 2, 2022 06:51
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.

3 participants