From db80ed4fa935b3ab63a8cfa999a7e9981a51659d Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 14 Sep 2021 09:41:05 -0400 Subject: [PATCH] Fix warnings in snapshots and spv-in --- src/front/spv/mod.rs | 8 -------- tests/snapshots.rs | 15 ++++++--------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/front/spv/mod.rs b/src/front/spv/mod.rs index 85c1faf90..3e55254f6 100644 --- a/src/front/spv/mod.rs +++ b/src/front/spv/mod.rs @@ -268,7 +268,6 @@ struct EntryPoint { name: String, early_depth_test: Option, workgroup_size: [u32; 3], - function_id: spirv::Word, variable_ids: Vec, } @@ -333,12 +332,6 @@ enum LookupLoadOverride { Loaded(Handle), } -#[derive(Clone, Debug)] -struct Assignment { - to: Handle, - value: Handle, -} - #[derive(PartialEq)] enum ExtendedClass { Global(crate::StorageClass), @@ -3397,7 +3390,6 @@ impl> Parser { name, early_depth_test: None, workgroup_size: [0; 3], - function_id, variable_ids: self.data.by_ref().take(left as usize).collect(), }; self.lookup_entry_point.insert(function_id, ep); diff --git a/tests/snapshots.rs b/tests/snapshots.rs index 63d99ebad..f9376f31e 100644 --- a/tests/snapshots.rs +++ b/tests/snapshots.rs @@ -1,7 +1,4 @@ -//TODO: move this to a binary target once Rust supports -// binary-specific dependencies. - -use std::{fs, path::Path, path::PathBuf}; +use std::{fs, path::PathBuf}; const BASE_DIR_IN: &str = "tests/in"; const BASE_DIR_OUT: &str = "tests/out"; @@ -169,7 +166,7 @@ fn check_targets(module: &naga::Module, name: &str, targets: Targets) { fn write_output_spv( module: &naga::Module, info: &naga::valid::ModuleInfo, - destination: &Path, + destination: &PathBuf, file_name: &str, params: &Parameters, ) { @@ -226,7 +223,7 @@ fn write_output_spv( fn write_output_msl( module: &naga::Module, info: &naga::valid::ModuleInfo, - destination: &Path, + destination: &PathBuf, file_name: &str, params: &Parameters, ) { @@ -263,7 +260,7 @@ fn write_output_msl( fn write_output_glsl( module: &naga::Module, info: &naga::valid::ModuleInfo, - destination: &Path, + destination: &PathBuf, file_name: &str, stage: naga::ShaderStage, ep_name: &str, @@ -304,7 +301,7 @@ fn write_output_glsl( fn write_output_hlsl( module: &naga::Module, info: &naga::valid::ModuleInfo, - destination: &Path, + destination: &PathBuf, file_name: &str, params: &Parameters, ) { @@ -393,7 +390,7 @@ fn write_output_hlsl( fn write_output_wgsl( module: &naga::Module, info: &naga::valid::ModuleInfo, - destination: &Path, + destination: &PathBuf, file_name: &str, ) { use naga::back::wgsl;