Skip to content

Commit 9f9f2d4

Browse files
committed
fix(core): drop the redundant max on the re-read fence value
The re-read is taken from the same fence, later on the same thread, so under the monotonicity this fix already relies on it can never be below `current_finished_submission`. The `max` was therefore dead — and in the one case where it would not be, a backend whose fence regressed, it would hide that from the assert rather than let it fire.
1 parent 9021559 commit 9f9f2d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wgpu-core/src/device/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ impl Device {
10851085
// high, and the fence is monotonic.
10861086
let finished_submission =
10871087
match unsafe { self.raw().get_fence_value(self.fence.as_ref()) } {
1088-
Ok(fence_value) => fence_value.max(current_finished_submission),
1088+
Ok(fence_value) => fence_value,
10891089
Err(e) => {
10901090
let hal_error: WaitIdleError = self.handle_hal_error(e).into();
10911091
return (user_closures, Err(hal_error));

0 commit comments

Comments
 (0)