Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fully qualified syntax for some calls. #2655

Merged
merged 1 commit into from
May 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions wgpu-core/src/command/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let (device_guard, mut token) = hub.devices.read(&mut token);

let (mut cmd_buf_guard, mut token) = hub.command_buffers.write(&mut token);
let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, encoder_id)
.map_pass_err(init_scope)?;
// Spell out the type, to placate rust-analyzer.
// https://github.com/rust-lang/rust-analyzer/issues/12247
let cmd_buf: &mut CommandBuffer<A> =
CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, encoder_id)
.map_pass_err(init_scope)?;
// will be reset to true if recording is done without errors
cmd_buf.status = CommandEncoderStatus::Error;
let raw = cmd_buf.encoder.open();
Expand Down
7 changes: 5 additions & 2 deletions wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let (trackers, query_reset_state, pending_discard_init_fixups) = {
let (mut cmb_guard, mut token) = hub.command_buffers.write(&mut token);

let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmb_guard, encoder_id)
.map_pass_err(init_scope)?;
// Spell out the type, to placate rust-analyzer.
// https://github.com/rust-lang/rust-analyzer/issues/12247
let cmd_buf: &mut CommandBuffer<A> =
CommandBuffer::get_encoder_mut(&mut *cmb_guard, encoder_id)
.map_pass_err(init_scope)?;
// close everything while the new command encoder is filled
cmd_buf.encoder.close();
// will be reset to true if recording is done without errors
Expand Down