mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[rs] Update wgpu, work around surface validation
This commit is contained in:
parent
c56340fb62
commit
a14c253e6a
@ -26,14 +26,14 @@ vulkan-portability = ["wgc/gfx-backend-vulkan", "gfx-backend-vulkan"]
|
||||
package = "wgpu-core"
|
||||
#version = "0.6"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "af9713b249cc158276aeb643900f095e7699167a"
|
||||
rev = "5e1226995c368f9b4cfde2da7f5d6c12d22e1bf2"
|
||||
features = ["raw-window-handle"]
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
#version = "0.6"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "af9713b249cc158276aeb643900f095e7699167a"
|
||||
rev = "5e1226995c368f9b4cfde2da7f5d6c12d22e1bf2"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.5"
|
||||
@ -85,7 +85,9 @@ test = true
|
||||
|
||||
[patch."https://github.com/gfx-rs/gfx-extras"]
|
||||
#gfx-descriptor = { version = "0.2", path = "../gfx-extras/gfx-descriptor" }
|
||||
#gfx-memory = { version = "0.2", path = "../gfx-extras/gfx-memory" }
|
||||
|
||||
[patch."https://github.com/zakarumych/gpu-alloc"]
|
||||
#gpu-alloc = { path = "../gpu-alloc/gpu-alloc" }
|
||||
|
||||
[patch.crates-io]
|
||||
#gfx-hal = { version = "0.6", path = "../gfx/src/hal" }
|
||||
|
||||
@ -66,7 +66,9 @@ impl framework::Example for Example {
|
||||
visibility: wgpu::ShaderStage::COMPUTE,
|
||||
ty: wgpu::BindingType::UniformBuffer {
|
||||
dynamic: false,
|
||||
min_binding_size: wgpu::BufferSize::new((sim_param_data.len()*std::mem::size_of::<f32>()) as _),
|
||||
min_binding_size: wgpu::BufferSize::new(
|
||||
(sim_param_data.len() * std::mem::size_of::<f32>()) as _,
|
||||
),
|
||||
},
|
||||
count: None,
|
||||
},
|
||||
|
||||
@ -1216,8 +1216,9 @@ impl crate::Context for Context {
|
||||
)
|
||||
}
|
||||
|
||||
fn surface_drop(&self, surface: &Self::SurfaceId) {
|
||||
self.0.surface_drop(*surface)
|
||||
fn surface_drop(&self, _surface: &Self::SurfaceId) {
|
||||
//TODO: swapchain needs to hold the surface alive
|
||||
//self.0.surface_drop(*surface)
|
||||
}
|
||||
|
||||
fn adapter_drop(&self, adapter: &Self::AdapterId) {
|
||||
|
||||
@ -57,7 +57,10 @@ impl Context {
|
||||
}
|
||||
let buffer = device.0.create_buffer(&buffer_desc);
|
||||
let data = js_sys::Uint8Array::from(contents).buffer();
|
||||
device.0.default_queue().write_buffer_with_u32(&buffer, 0, &data);
|
||||
device
|
||||
.0
|
||||
.default_queue()
|
||||
.write_buffer_with_u32(&buffer, 0, &data);
|
||||
Sendable(buffer)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user