mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] Update to wgpu with shader validation
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -24,6 +24,7 @@ async fn run() {
|
||||
&wgpu::DeviceDescriptor {
|
||||
extensions: wgpu::Extensions::empty(),
|
||||
limits: wgpu::Limits::default(),
|
||||
shader_validation: true,
|
||||
},
|
||||
None,
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
});
|
||||
|
||||
@@ -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()
|
||||
});
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user