mark timestamp query inside encoders/passes tests as flaky (#5838)

This commit is contained in:
Teodor Tanasoaia authored and GitHub committed 2024-06-19 12:45:14 +02:00
1 parent 14e750205a
commit 1904822084
1 file changed
+28 -9
+28 -9
View File
@@ -435,7 +435,7 @@ pub fn main() {
#[cfg(test)]
mod tests {
use wgpu_test::{gpu_test, GpuTestConfiguration};
use wgpu_test::{gpu_test, FailureCase, GpuTestConfiguration};
use super::{submit_render_and_compute_pass_with_queries, QueryResults};
@@ -456,7 +456,9 @@ mod tests {
.features(
wgpu::Features::TIMESTAMP_QUERY
| wgpu::Features::TIMESTAMP_QUERY_INSIDE_ENCODERS,
),
)
// see https://github.com/gfx-rs/wgpu/issues/2521
.expect_fail(FailureCase::always().panic("unexpected timestamp").flaky()),
)
.run_sync(|ctx| test_timestamps(ctx, true, false));
@@ -469,7 +471,9 @@ mod tests {
wgpu::Features::TIMESTAMP_QUERY
| wgpu::Features::TIMESTAMP_QUERY_INSIDE_ENCODERS
| wgpu::Features::TIMESTAMP_QUERY_INSIDE_PASSES,
),
)
// see https://github.com/gfx-rs/wgpu/issues/2521
.expect_fail(FailureCase::always().panic("unexpected timestamp").flaky()),
)
.run_sync(|ctx| test_timestamps(ctx, true, true));
@@ -497,16 +501,31 @@ mod tests {
let encoder_delta = encoder_timestamps[1].wrapping_sub(encoder_timestamps[0]);
if timestamps_on_encoder {
assert!(encoder_delta > 0);
assert!(encoder_delta >= render_delta + compute_delta);
assert!(encoder_delta > 0, "unexpected timestamp");
assert!(
encoder_delta >= render_delta + compute_delta,
"unexpected timestamp"
);
}
if let Some(render_inside_timestamp) = render_inside_timestamp {
assert!(render_inside_timestamp >= render_start_end_timestamps[0]);
assert!(render_inside_timestamp <= render_start_end_timestamps[1]);
assert!(
render_inside_timestamp >= render_start_end_timestamps[0],
"unexpected timestamp"
);
assert!(
render_inside_timestamp <= render_start_end_timestamps[1],
"unexpected timestamp"
);
}
if let Some(compute_inside_timestamp) = compute_inside_timestamp {
assert!(compute_inside_timestamp >= compute_start_end_timestamps[0]);
assert!(compute_inside_timestamp <= compute_start_end_timestamps[1]);
assert!(
compute_inside_timestamp >= compute_start_end_timestamps[0],
"unexpected timestamp"
);
assert!(
compute_inside_timestamp <= compute_start_end_timestamps[1],
"unexpected timestamp"
);
}
}
}