@@ -33,9 +33,9 @@ fn mouse_button_index(button: MouseButton) -> usize {
33
33
}
34
34
35
35
async fn run (
36
- event_loop : EventLoop < wgpu:: ShaderModuleDescriptorSpirV < ' static > > ,
36
+ event_loop : EventLoop < wgpu:: ShaderModuleDescriptor < ' static > > ,
37
37
window : Window ,
38
- shader_binary : wgpu:: ShaderModuleDescriptorSpirV < ' static > ,
38
+ shader_binary : wgpu:: ShaderModuleDescriptor < ' static > ,
39
39
) {
40
40
let instance = wgpu:: Instance :: new ( wgpu:: Backends :: VULKAN | wgpu:: Backends :: METAL ) ;
41
41
@@ -57,7 +57,7 @@ async fn run(
57
57
. await
58
58
. expect ( "Failed to find an appropriate adapter" ) ;
59
59
60
- let features = wgpu:: Features :: PUSH_CONSTANTS | wgpu :: Features :: SPIRV_SHADER_PASSTHROUGH ;
60
+ let features = wgpu:: Features :: PUSH_CONSTANTS ;
61
61
let limits = wgpu:: Limits {
62
62
max_push_constant_size : 256 ,
63
63
..Default :: default ( )
@@ -82,7 +82,7 @@ async fn run(
82
82
label : None ,
83
83
bind_group_layouts : & [ ] ,
84
84
push_constant_ranges : & [ wgpu:: PushConstantRange {
85
- stages : wgpu:: ShaderStages :: all ( ) ,
85
+ stages : wgpu:: ShaderStages :: VERTEX | wgpu :: ShaderStages :: FRAGMENT ,
86
86
range : 0 ..std:: mem:: size_of :: < ShaderConstants > ( ) as u32 ,
87
87
} ] ,
88
88
} ) ;
@@ -214,7 +214,7 @@ async fn run(
214
214
215
215
rpass. set_pipeline ( render_pipeline) ;
216
216
rpass. set_push_constants (
217
- wgpu:: ShaderStages :: all ( ) ,
217
+ wgpu:: ShaderStages :: VERTEX | wgpu :: ShaderStages :: FRAGMENT ,
218
218
0 ,
219
219
bytemuck:: bytes_of ( & push_constants) ,
220
220
) ;
@@ -284,9 +284,9 @@ fn create_pipeline(
284
284
device : & wgpu:: Device ,
285
285
pipeline_layout : & wgpu:: PipelineLayout ,
286
286
surface_format : wgpu:: TextureFormat ,
287
- shader_binary : wgpu:: ShaderModuleDescriptorSpirV < ' _ > ,
287
+ shader_binary : wgpu:: ShaderModuleDescriptor < ' _ > ,
288
288
) -> wgpu:: RenderPipeline {
289
- let module = unsafe { device. create_shader_module_spirv ( & shader_binary) } ;
289
+ let module = device. create_shader_module ( & shader_binary) ;
290
290
device. create_render_pipeline ( & wgpu:: RenderPipelineDescriptor {
291
291
label : None ,
292
292
layout : Some ( pipeline_layout) ,
0 commit comments