Update testing limits for rpi4

This commit is contained in:
Connor Fitzgerald 2021-07-01 23:20:20 -04:00
parent 9ee728bd53
commit f76200e725
12 changed files with 29 additions and 18 deletions

1
Cargo.lock generated
View File

@ -2010,6 +2010,7 @@ dependencies = [
name = "wgpu-info"
version = "0.9.0"
dependencies = [
"env_logger",
"wgpu",
]

View File

@ -265,7 +265,8 @@ impl Inner {
egl::CONTEXT_CLIENT_VERSION,
3, // Request GLES 3.0 or higher
];
if flags.contains(crate::InstanceFlags::DEBUG) && !cfg!(target_os = "android") {
// Debug requires EGL 1.5+
if flags.contains(crate::InstanceFlags::DEBUG) && version >= (1, 5) {
log::info!("\tEGL context: +debug");
//TODO: figure out why this is needed
context_attributes.push(egl::CONTEXT_OPENGL_DEBUG);

View File

@ -10,4 +10,5 @@ keywords = ["graphics"]
license = "MIT OR Apache-2.0"
[dependencies]
env_logger = "0.8"
wgpu = { version = "0.9", path = "../wgpu" }

View File

@ -85,6 +85,8 @@ fn print_info_from_adapter(adapter: &wgpu::Adapter, idx: usize) {
}
fn main() {
env_logger::init();
let args: Vec<_> = std::env::args().skip(1).collect();
let instance = wgpu::Instance::new(wgpu::Backends::all());

View File

@ -325,8 +325,9 @@ fn boids() {
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default(),
base_test_parameters: framework::test_common::TestParameters::default()
.downlevel_flags(wgpu::DownlevelFlags::COMPUTE_SHADERS),
tollerance: 0,
max_outliers: 50,
max_outliers: 600, // Currently bounded by rpi4
});
}

View File

@ -389,7 +389,7 @@ fn cube() {
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default(),
tollerance: 1,
max_outliers: 3,
max_outliers: 500, // Bounded by rpi4
});
}
@ -402,6 +402,6 @@ fn cube_lines() {
optional_features: wgpu::Features::NON_FILL_POLYGON_MODE,
base_test_parameters: framework::test_common::TestParameters::default(),
tollerance: 2,
max_outliers: 400, // Line rasterization is very different between vendors
max_outliers: 500, // Bounded by rpi4 & intel 620 on GL
});
}

View File

@ -8,7 +8,7 @@ use common::{initialize_test, TestParameters};
#[test]
fn test_compute_1() {
initialize_test(TestParameters::default(), |ctx| {
initialize_test(TestParameters::default().specific_failure(Some(wgpu::Backends::GL), None, Some("V3D"), false), |ctx| {
let input = &[1, 2, 3, 4];
pollster::block_on(assert_execute_gpu(
@ -22,7 +22,7 @@ fn test_compute_1() {
#[test]
fn test_compute_2() {
initialize_test(TestParameters::default(), |ctx| {
initialize_test(TestParameters::default().specific_failure(Some(wgpu::Backends::GL), None, Some("V3D"), false), |ctx| {
let input = &[5, 23, 10, 9];
pollster::block_on(assert_execute_gpu(
@ -36,7 +36,7 @@ fn test_compute_2() {
#[test]
fn test_compute_overflow() {
initialize_test(TestParameters::default(), |ctx| {
initialize_test(TestParameters::default().specific_failure(Some(wgpu::Backends::GL), None, Some("V3D"), false), |ctx| {
let input = &[77031, 837799, 8400511, 63728127];
pollster::block_on(assert_execute_gpu(
&ctx.device,
@ -49,7 +49,7 @@ fn test_compute_overflow() {
#[test]
fn test_multithreaded_compute() {
initialize_test(TestParameters::default(), |ctx| {
initialize_test(TestParameters::default().backend_failures(wgpu::Backends::GL), |ctx| {
use std::{sync::mpsc, thread, time::Duration};
let ctx = Arc::new(ctx);

View File

@ -483,7 +483,7 @@ fn mipmap() {
height: 768,
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default()
.backend_failures(wgpu::Backends::VULKAN),
.backend_failures(wgpu::Backends::VULKAN | wgpu::Backends::GL),
tollerance: 25,
max_outliers: 3000, // Mipmap sampling is highly variant between impls. This is currently bounded by AMD on mac
});

View File

@ -829,8 +829,8 @@ fn shadow() {
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default(),
base_test_parameters: framework::test_common::TestParameters::default().downlevel_flags(wgpu::DownlevelFlags::COMPARISON_SAMPLERS),
tollerance: 2,
max_outliers: 5,
max_outliers: 500, // bounded by rpi4
});
}

View File

@ -472,7 +472,7 @@ fn skybox() {
height: 768,
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default()
.backend_failures(wgpu::Backends::VULKAN),
.backend_failures(wgpu::Backends::VULKAN | wgpu::Backends::GL),
tollerance: 2,
max_outliers: 3,
});
@ -499,8 +499,8 @@ fn skybox_etc2() {
height: 768,
optional_features: wgpu::Features::TEXTURE_COMPRESSION_ETC2,
base_test_parameters: framework::test_common::TestParameters::default(),
tollerance: 5, // TODO
max_outliers: 10, // TODO
tollerance: 5,
max_outliers: 50, // Bounded by rpi4
});
}

View File

@ -791,13 +791,13 @@ fn main() {
}
#[test]
fn shadow() {
fn water() {
framework::test::<Example>(framework::FrameworkRefTest {
image_path: "/examples/water/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
base_test_parameters: framework::test_common::TestParameters::default(),
base_test_parameters: framework::test_common::TestParameters::default().downlevel_flags(wgpu::DownlevelFlags::READ_ONLY_DEPTH_STENCIL),
tollerance: 5,
max_outliers: 10,
});

View File

@ -5,7 +5,7 @@ use std::panic::{catch_unwind, AssertUnwindSafe};
use wgt::{Backends, DeviceDescriptor, DownlevelCapabilities, Features, Limits};
use wgpu::{util, Adapter, Device, Instance, Queue};
use wgpu::{util, Adapter, Device, DownlevelFlags, Instance, Queue};
pub mod image;
@ -119,6 +119,11 @@ impl TestParameters {
self
}
pub fn downlevel_flags(mut self, downlevel_flags: DownlevelFlags) -> Self {
self.required_downlevel_properties.flags |= downlevel_flags;
self
}
/// Mark the test as always failing, equivilant to specific_failure(None, None, None)
pub fn failure(mut self) -> Self {
self.failures.push((None, None, None, false));