Skip to content
Permalink
Browse files

Auto merge of #25507 - szeged:update-wgpu-core, r=jdm

Update wgpu-core

<!-- Please describe your changes on the following line: -->
Update `wgpu-core` to the latest master. This version contains a fix for an issue which occurred when we exited from a WebGPU thread.

cc @kvark @jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/25507)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Jan 14, 2020
2 parents b52ddc5 + b16509a commit 13ce1c1add4ed69607b0dc78224ae01978820468
Showing with 71 additions and 20 deletions.
  1. +62 −12 Cargo.lock
  2. +7 −8 components/webgpu/lib.rs
  3. +2 −0 servo-tidy.toml

Some generated files are not rendered by default. Learn more.

@@ -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 ({})",
@@ -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 {
@@ -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();
@@ -31,6 +31,8 @@ packages = [
"cgl",
"cocoa",
"gleam",
"mach",
"nix",
"wayland-sys",

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

0 comments on commit 13ce1c1

Please sign in to comment.
You can’t perform that action at this time.