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

lint: deno_webgpu & wgpu-core #2403

Merged
merged 1 commit into from
Jan 18, 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
2 changes: 1 addition & 1 deletion deno_webgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pub async fn op_webgpu_request_adapter(

let descriptor = wgpu_core::instance::RequestAdapterOptions {
power_preference: match args.power_preference {
Some(power_preference) => power_preference.into(),
Some(power_preference) => power_preference,
None => PowerPreference::default(),
},
force_fallback_adapter: args.force_fallback_adapter,
Expand Down
10 changes: 5 additions & 5 deletions deno_webgpu/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ impl TryFrom<GpuDepthStencilState> for wgpu_types::DepthStencilState {
Ok(wgpu_types::DepthStencilState {
format: state.format,
depth_write_enabled: state.depth_write_enabled,
depth_compare: state.depth_compare.into(),
depth_compare: state.depth_compare,
stencil: wgpu_types::StencilState {
front: state.stencil_front.into(),
back: state.stencil_back.into(),
front: state.stencil_front,
back: state.stencil_back,
read_mask: state.stencil_read_mask,
write_mask: state.stencil_write_mask,
},
Expand Down Expand Up @@ -322,7 +322,7 @@ pub fn op_webgpu_create_render_pipeline(
let mut targets = Vec::with_capacity(fragment.targets.len());

for target in fragment.targets {
targets.push(target.try_into()?);
targets.push(target);
}
AaronO marked this conversation as resolved.
Show resolved Hide resolved

Some(wgpu_core::pipeline::FragmentState {
Expand Down Expand Up @@ -356,7 +356,7 @@ pub fn op_webgpu_create_render_pipeline(
},
primitive: args.primitive.into(),
depth_stencil: args.depth_stencil.map(TryInto::try_into).transpose()?,
multisample: args.multisample.into(),
multisample: args.multisample,
fragment,
multiview: None,
};
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/present.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
unsafe {
hal::Device::create_texture_view(
&device.raw,
&ast.texture.borrow(),
ast.texture.borrow(),
&clear_view_desc,
)
}
Expand Down