[rs] Update to wgpu with shader validation

This commit is contained in:
Dzmitry Malyshau
2020-06-05 10:15:59 -04:00
parent 5f567e227a
commit 30c8b64883
10 changed files with 10 additions and 16 deletions

View File

@@ -28,14 +28,14 @@ vulkan = ["wgc/gfx-backend-vulkan"]
package = "wgpu-core"
version = "0.5"
git = "https://github.com/gfx-rs/wgpu"
rev = "041db60f9080769b5edc40888cf9683ccb255399"
rev = "eaf8f4af87237373105b016832662e7943b3899c"
features = ["raw-window-handle"]
[dependencies.wgt]
package = "wgpu-types"
version = "0.5"
git = "https://github.com/gfx-rs/wgpu"
rev = "041db60f9080769b5edc40888cf9683ccb255399"
rev = "eaf8f4af87237373105b016832662e7943b3899c"
[dependencies]
arrayvec = "0.5"

View File

@@ -24,6 +24,7 @@ async fn run() {
&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions::empty(),
limits: wgpu::Limits::default(),
shader_validation: true,
},
None,
)

View File

@@ -202,9 +202,6 @@ impl framework::Example for Example {
mag_filter: wgpu::FilterMode::Nearest,
min_filter: wgpu::FilterMode::Linear,
mipmap_filter: wgpu::FilterMode::Nearest,
lod_min_clamp: 0.0,
lod_max_clamp: 100.0,
compare: None,
..Default::default()
});
let mx_total = Self::generate_matrix(sc_desc.width as f32 / sc_desc.height as f32);

View File

@@ -78,6 +78,7 @@ async fn run_async<E: Example>(event_loop: EventLoop<()>, window: Window) {
&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions::empty(),
limits: wgpu::Limits::default(),
shader_validation: true,
},
trace_dir.ok().as_ref().map(std::path::Path::new),
)

View File

@@ -40,6 +40,7 @@ async fn execute_gpu(numbers: Vec<u32>) -> Vec<u32> {
&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions::empty(),
limits: wgpu::Limits::default(),
shader_validation: true,
},
None,
)

View File

@@ -25,6 +25,7 @@ async fn run(event_loop: EventLoop<()>, window: Window, swapchain_format: wgpu::
&wgpu::DeviceDescriptor {
extensions: wgpu::Extensions::empty(),
limits: wgpu::Limits::default(),
shader_validation: true,
},
None,
)

View File

@@ -154,9 +154,6 @@ impl Example {
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Nearest,
mipmap_filter: wgpu::FilterMode::Nearest,
lod_min_clamp: 0.0,
lod_max_clamp: 100.0,
compare: None,
..Default::default()
});
@@ -307,9 +304,6 @@ impl framework::Example for Example {
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Linear,
mipmap_filter: wgpu::FilterMode::Linear,
lod_min_clamp: 0.0,
lod_max_clamp: 100.0,
compare: None,
..Default::default()
});
let mx_total = Self::generate_matrix(sc_desc.width as f32 / sc_desc.height as f32);

View File

@@ -350,8 +350,6 @@ impl framework::Example for Example {
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Linear,
mipmap_filter: wgpu::FilterMode::Nearest,
lod_min_clamp: -100.0,
lod_max_clamp: 100.0,
compare: Some(wgpu::CompareFunction::LessEqual),
..Default::default()
});

View File

@@ -127,9 +127,6 @@ impl framework::Example for Skybox {
mag_filter: wgpu::FilterMode::Nearest,
min_filter: wgpu::FilterMode::Linear,
mipmap_filter: wgpu::FilterMode::Nearest,
lod_min_clamp: 0.0,
lod_max_clamp: 100.0,
compare: None,
..Default::default()
});

View File

@@ -351,6 +351,7 @@ impl crate::Context for Context {
},
PhantomData
))
.unwrap()
}
fn device_create_bind_group(
@@ -416,6 +417,7 @@ impl crate::Context for Context {
},
PhantomData
))
.unwrap()
}
fn device_create_render_pipeline(
@@ -485,6 +487,7 @@ impl crate::Context for Context {
},
PhantomData
))
.unwrap()
}
fn device_create_compute_pipeline(
@@ -507,6 +510,7 @@ impl crate::Context for Context {
},
PhantomData
))
.unwrap()
}
fn device_create_buffer(