mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
[core] Provide an explicit type for some CommandBuffer pointers. (#5512)
This commit is contained in:
1 parent
cc0ee7bcbd
commit
8289711b65
2 files changed
+5
-2
No files matched your search
@@ -36,6 +36,7 @@ use serde::Serialize;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::{fmt, mem, str};
|
||||
|
||||
#[doc(hidden)]
|
||||
@@ -365,7 +366,8 @@ impl Global {
|
||||
|
||||
let hub = A::hub(self);
|
||||
|
||||
let cmd_buf = CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let cmd_buf: Arc<CommandBuffer<A>> =
|
||||
CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let device = &cmd_buf.device;
|
||||
if !device.is_valid() {
|
||||
return Err(ComputePassErrorInner::InvalidDevice(
|
||||
|
||||
@@ -1343,7 +1343,8 @@ impl Global {
|
||||
|
||||
let hub = A::hub(self);
|
||||
|
||||
let cmd_buf = CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let cmd_buf: Arc<CommandBuffer<A>> =
|
||||
CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let device = &cmd_buf.device;
|
||||
let snatch_guard = device.snatchable_lock.read();
|
||||
|
||||
|
||||
Reference in new issue
Block a user