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

Add type annotation to render pass code, for rust-analyzer. #2773

Merged
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
10 changes: 5 additions & 5 deletions wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {
let mut depth_stencil = None;

if let Some(at) = depth_stencil_attachment {
let view = cmd_buf
let view: &TextureView<A> = cmd_buf
.trackers
.views
.add_single(&*view_guard, at.view)
Expand Down Expand Up @@ -840,7 +840,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {
}

for at in color_attachments {
let color_view = cmd_buf
let color_view: &TextureView<A> = cmd_buf
.trackers
.views
.add_single(&*view_guard, at.view)
Expand Down Expand Up @@ -870,7 +870,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {

let mut hal_resolve_target = None;
if let Some(resolve_target) = at.resolve_target {
let resolve_view = cmd_buf
let resolve_view: &TextureView<A> = cmd_buf
.trackers
.views
.add_single(&*view_guard, resolve_target)
Expand Down Expand Up @@ -1191,7 +1191,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
);
dynamic_offset_count += num_dynamic_offsets as usize;

let bind_group = cmd_buf
let bind_group: &crate::binding_model::BindGroup<A> = cmd_buf
.trackers
.bind_groups
.add_single(&*bind_group_guard, bind_group_id)
Expand Down Expand Up @@ -1255,7 +1255,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let scope = PassErrorScope::SetPipelineRender(pipeline_id);
state.pipeline = Some(pipeline_id);

let pipeline = cmd_buf
let pipeline: &pipeline::RenderPipeline<A> = cmd_buf
.trackers
.render_pipelines
.add_single(&*render_pipeline_guard, pipeline_id)
Expand Down