mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fixing some style related issues in WebGPU.
Changed the Requests/Response from tuples to named struct variants and also sorted in alphabetical order. Replaced the ID generator functions from `globalscope` with a single function, which returns a `RefMut` and can call the appropriate method to generate resource IDs.
This commit is contained in:
parent
0f9b04680a
commit
000a5d543d
10 changed files with 561 additions and 472 deletions
|
@ -81,11 +81,14 @@ impl GPUComputePassEncoderMethods for GPUComputePassEncoder {
|
|||
/// https://gpuweb.github.io/gpuweb/#dom-gpurenderpassencoder-endpass
|
||||
fn EndPass(&self) {
|
||||
if let Some(raw_pass) = self.raw_pass.borrow_mut().take() {
|
||||
let (pass_data, id) = unsafe { raw_pass.finish_compute() };
|
||||
let (pass_data, command_encoder_id) = unsafe { raw_pass.finish_compute() };
|
||||
|
||||
self.channel
|
||||
.0
|
||||
.send(WebGPURequest::RunComputePass(id, pass_data))
|
||||
.send(WebGPURequest::RunComputePass {
|
||||
command_encoder_id,
|
||||
pass_data,
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue