Update to wgpu 0.12

This commit is contained in:
Werner
2022-03-31 19:52:27 -03:00
parent b23bc27f55
commit 0a24096e90
7 changed files with 18 additions and 12 deletions

View File

@ -183,12 +183,12 @@ impl State for Cubes {
layout: Some(&render_pipeline_layout),
vertex: wgpu::VertexState {
module: &shader,
entry_point: "main",
entry_point: "vs_main",
buffers: &[ModelVertex::GetDescriptor(), InstanceRaw::GetDescriptor()],
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "main",
entry_point: "fs_main",
targets: &[wgpu::ColorTargetState {
format: display.config.format,
blend: Some(wgpu::BlendState {

View File

@ -99,7 +99,7 @@ impl State for Triangle {
layout: Some(&render_pipeline_layout),
vertex: wgpu::VertexState {
module: &shader_module,
entry_point: "main",
entry_point: "vs_main",
buffers: &[wgpu::VertexBufferLayout {
array_stride: std::mem::size_of::<TriangleVertex>()
as wgpu::BufferAddress,
@ -120,7 +120,7 @@ impl State for Triangle {
},
fragment: Some(wgpu::FragmentState {
module: &shader_module,
entry_point: "main",
entry_point: "fs_main",
targets: &[wgpu::ColorTargetState {
format: renderer.config.format,
blend: Some(wgpu::BlendState::REPLACE),
@ -133,7 +133,7 @@ impl State for Triangle {
front_face: wgpu::FrontFace::Ccw,
cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill,
clamp_depth: false,
unclipped_depth: false,
conservative: false,
},
depth_stencil: None,
@ -142,6 +142,7 @@ impl State for Triangle {
mask: !0,
alpha_to_coverage_enabled: false,
},
multiview: None,
})
};