Skip to content

Commit

Permalink
Update wgpu-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakor Gyula committed Jan 14, 2020
1 parent 430248e commit b16509a
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 20 deletions.
74 changes: 62 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions components/webgpu/lib.rs
Expand Up @@ -182,9 +182,9 @@ impl WGPU {
},
WebGPURequest::CreateBuffer(sender, device, id, descriptor) => {
let global = &self.global;
let _output =
let buffer_id =
gfx_select!(id => global.device_create_buffer(device.0, &descriptor, id));
let buffer = WebGPUBuffer(id);
let buffer = WebGPUBuffer(buffer_id);
if let Err(e) = sender.send(buffer) {
warn!(
"Failed to send response to WebGPURequest::CreateBuffer ({})",
Expand All @@ -194,12 +194,11 @@ impl WGPU {
},
WebGPURequest::CreateBufferMapped(sender, device, id, descriptor) => {
let global = &self.global;
let mut arr_buff_ptr: *mut u8 = std::ptr::null_mut();
let buffer_size = descriptor.size as usize;

let _output = gfx_select!(id =>
global.device_create_buffer_mapped(device.0, &descriptor, &mut arr_buff_ptr, id));
let buffer = WebGPUBuffer(id);
let (buffer_id, arr_buff_ptr) = gfx_select!(id =>
global.device_create_buffer_mapped(device.0, &descriptor, id));
let buffer = WebGPUBuffer(buffer_id);

let mut array_buffer = Vec::with_capacity(buffer_size);
unsafe {
Expand All @@ -215,11 +214,11 @@ impl WGPU {
},
WebGPURequest::UnmapBuffer(buffer) => {
let global = &self.global;
let _output = gfx_select!(buffer.0 => global.buffer_unmap(buffer.0));
gfx_select!(buffer.0 => global.buffer_unmap(buffer.0));
},
WebGPURequest::DestroyBuffer(buffer) => {
let global = &self.global;
let _output = gfx_select!(buffer.0 => global.buffer_destroy(buffer.0));
gfx_select!(buffer.0 => global.buffer_destroy(buffer.0));
},
WebGPURequest::Exit(sender) => {
self.deinit();
Expand Down
2 changes: 2 additions & 0 deletions servo-tidy.toml
Expand Up @@ -31,6 +31,8 @@ packages = [
"cgl",
"cocoa",
"gleam",
"mach",
"nix",
"wayland-sys",

# https://github.com/servo/servo/pull/23288#issuecomment-494687746
Expand Down

0 comments on commit b16509a

Please sign in to comment.