mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
refactor: Global::device_poll
: hoist submission_index
extr.
This commit is contained in:
parent
fe28eda3e0
commit
c5ee3b6880
@ -2097,16 +2097,16 @@ impl Global {
|
||||
.get(device_id)
|
||||
.map_err(|_| DeviceError::Invalid)?;
|
||||
|
||||
let (closures, queue_empty) = {
|
||||
if let wgt::Maintain::WaitForSubmissionIndex(submission_index) = maintain {
|
||||
if submission_index.queue_id != device_id.transmute() {
|
||||
return Err(WaitIdleError::WrongSubmissionIndex(
|
||||
submission_index.queue_id,
|
||||
device_id,
|
||||
));
|
||||
}
|
||||
if let wgt::Maintain::WaitForSubmissionIndex(submission_index) = maintain {
|
||||
if submission_index.queue_id != device_id.transmute() {
|
||||
return Err(WaitIdleError::WrongSubmissionIndex(
|
||||
submission_index.queue_id,
|
||||
device_id,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
let (closures, queue_empty) = {
|
||||
let fence = device.fence.read();
|
||||
let fence = fence.as_ref().unwrap();
|
||||
device.maintain(fence, maintain)?
|
||||
|
Loading…
Reference in New Issue
Block a user