mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 09:09:19 +01:00
make open_pass panic if the encoder is open
This commit is contained in:
1 parent
0fed4dbc16
commit
7b2a561402
1 file changed
+5
@@ -395,11 +395,16 @@ impl CommandEncoder {
|
||||
/// its own label.
|
||||
///
|
||||
/// The underlying hal encoder is put in the "recording" state.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - If the encoder is already open.
|
||||
pub(crate) fn open_pass(
|
||||
&mut self,
|
||||
label: Option<&str>,
|
||||
device: &Device,
|
||||
) -> Result<&mut dyn hal::DynCommandEncoder, DeviceError> {
|
||||
assert!(!self.is_open);
|
||||
self.is_open = true;
|
||||
|
||||
let hal_label = hal_label(label, device.instance_flags);
|
||||
|
||||
Reference in new issue
Block a user