File tree 2 files changed +5
-3
lines changed
examples/runners/wgpu/builder/src
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,13 @@ const SPIRV_TARGET_PREFIX: &str = "spirv-unknown-";
130
130
#[ cfg_attr( feature = "clap" , derive( clap:: ValueEnum ) ) ]
131
131
pub enum MetadataPrintout {
132
132
/// Print no cargo metadata.
133
+ #[ default]
133
134
None ,
134
135
/// Print only dependency information (eg for multiple modules).
135
136
DependencyOnly ,
136
137
/// Print all cargo metadata.
137
138
///
138
139
/// Includes dependency information and spirv environment variable.
139
- #[ default]
140
140
Full ,
141
141
}
142
142
Original file line number Diff line number Diff line change 1
- use spirv_builder:: SpirvBuilder ;
1
+ use spirv_builder:: { MetadataPrintout , SpirvBuilder } ;
2
2
use std:: env;
3
3
use std:: error:: Error ;
4
4
use std:: fs;
@@ -7,7 +7,9 @@ use std::path::Path;
7
7
fn build_shader ( path_to_crate : & str , codegen_names : bool ) -> Result < ( ) , Box < dyn Error > > {
8
8
let builder_dir = & Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
9
9
let path_to_crate = builder_dir. join ( path_to_crate) ;
10
- let result = SpirvBuilder :: new ( path_to_crate, "spirv-unknown-vulkan1.1" ) . build ( ) ?;
10
+ let result = SpirvBuilder :: new ( path_to_crate, "spirv-unknown-vulkan1.1" )
11
+ . print_metadata ( MetadataPrintout :: Full )
12
+ . build ( ) ?;
11
13
if codegen_names {
12
14
let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
13
15
let dest_path = Path :: new ( & out_dir) . join ( "entry_points.rs" ) ;
You can’t perform that action at this time.
0 commit comments