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

Vulkan portability in CI #3964

Merged
merged 3 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
# Mac
- name: Mac aarch64
os: [self-hosted, macOS]
backends: metal
backends: vulkan metal

# Linux
- name: Linux x86_64
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
run: |
set -e

cargo llvm-cov --no-cfg-coverage run --bin wgpu-info --no-report
cargo llvm-cov --no-cfg-coverage run --bin wgpu-info --no-report --features vulkan-portability

- name: run tests
shell: bash
Expand All @@ -284,7 +284,7 @@ jobs:

for backend in ${{ matrix.backends }}; do
echo "======= NATIVE TESTS $backend ======";
WGPU_BACKEND=$backend cargo llvm-cov --no-cfg-coverage nextest --no-fail-fast --no-report
WGPU_BACKEND=$backend cargo llvm-cov --no-cfg-coverage nextest --no-fail-fast --no-report --features vulkan-portability
done

- uses: actions/upload-artifact@v3
Expand Down
4 changes: 3 additions & 1 deletion examples/boids/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ fn boids() {
optional_features: wgpu::Features::default(),
base_test_parameters: wgpu_test::TestParameters::default()
.downlevel_flags(wgpu::DownlevelFlags::COMPUTE_SHADERS)
.limits(wgpu::Limits::downlevel_defaults()),
.limits(wgpu::Limits::downlevel_defaults())
// Lots of validation errors, maybe related to https://github.com/gfx-rs/wgpu/issues/3160
.molten_vk_failure(),
comparisons: &[wgpu_test::ComparisonType::Mean(0.005)],
});
}
12 changes: 12 additions & 0 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ impl TestParameters {
});
self
}

/// Mark the test as failing on vulkan on mac only
pub fn molten_vk_failure(self) -> Self {
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
self.specific_failure(Some(wgpu::Backends::VULKAN), None, None, false)
}
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
{
self
}
}
}

pub fn initialize_test(parameters: TestParameters, test_function: impl FnOnce(TestingContext)) {
Expand Down