mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
Merge #469
469: Update to latest `wgpu-core` device error handling r=kvark a=GabrielMajeri Corresponding PR for https://github.com/gfx-rs/wgpu/pull/832 Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
This commit is contained in:
commit
2f96127006
2 files changed
+7
-5
No files matched your search
+2
-2
@@ -27,14 +27,14 @@ vulkan-portability = ["wgc/gfx-backend-vulkan"]
|
||||
package = "wgpu-core"
|
||||
version = "0.5"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "0591c48fd234b4faa4c60346454568548ecbe507"
|
||||
rev = "6182495102e33ea22c354539aba06ef3bf393751"
|
||||
features = ["raw-window-handle"]
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
version = "0.5"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "0591c48fd234b4faa4c60346454568548ecbe507"
|
||||
rev = "6182495102e33ea22c354539aba06ef3bf393751"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.5"
|
||||
|
||||
@@ -578,6 +578,7 @@ impl crate::Context for Context {
|
||||
) -> Self::SwapChainId {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*device => global.device_create_swap_chain(*device, *surface, desc))
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn device_create_shader_module(
|
||||
@@ -805,6 +806,7 @@ impl crate::Context for Context {
|
||||
&desc.map_label(|_| owned_label.as_ptr()),
|
||||
PhantomData
|
||||
))
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn device_create_command_encoder(
|
||||
@@ -967,7 +969,7 @@ impl crate::Context for Context {
|
||||
let owned_label = OwnedLabel::new(desc.and_then(|d| d.label.as_deref()));
|
||||
let descriptor = desc.map(|d| d.map_label(|_| owned_label.as_ptr()));
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*texture => global.texture_create_view(*texture, descriptor.as_ref(), PhantomData))
|
||||
wgc::gfx_select!(*texture => global.texture_create_view(*texture, descriptor.as_ref(), PhantomData)).unwrap()
|
||||
}
|
||||
|
||||
fn texture_drop(&self, texture: &Self::TextureId) {
|
||||
@@ -976,7 +978,7 @@ impl crate::Context for Context {
|
||||
}
|
||||
fn texture_view_drop(&self, texture_view: &Self::TextureViewId) {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*texture_view => global.texture_view_destroy(*texture_view))
|
||||
wgc::gfx_select!(*texture_view => global.texture_view_destroy(*texture_view)).unwrap()
|
||||
}
|
||||
fn sampler_drop(&self, sampler: &Self::SamplerId) {
|
||||
let global = &self.0;
|
||||
@@ -984,7 +986,7 @@ impl crate::Context for Context {
|
||||
}
|
||||
fn buffer_drop(&self, buffer: &Self::BufferId) {
|
||||
let global = &self.0;
|
||||
wgc::gfx_select!(*buffer => global.buffer_destroy(*buffer))
|
||||
wgc::gfx_select!(*buffer => global.buffer_destroy(*buffer, false))
|
||||
}
|
||||
fn bind_group_drop(&self, bind_group: &Self::BindGroupId) {
|
||||
let global = &self.0;
|
||||
|
||||
Reference in new issue
Block a user