Commit graph

60 commits

Author SHA1 Message Date
Kunal Mohan
3661aa3d8c Use Device limits and features provided by user
Spec update
2020-09-23 11:37:03 +05:30
Kunal Mohan
85b6bbb33a prevent unconditional cloning of results 2020-08-27 21:18:25 +05:30
Kunal Mohan
851f83c61f Prevent redundant texture and buffer destroy calls 2020-08-25 11:07:25 +05:30
Kunal Mohan
40288783a1 fix presentation belt 2020-08-23 21:18:55 +05:30
Kunal Mohan
9c3967158a defer encoding errors to finish() 2020-08-22 17:43:10 +05:30
Kunal Mohan
e1bfc7aa0d upgrade wgpu to v0.6 2020-08-22 17:42:40 +05:30
Kunal Mohan
f082a507da Implement GPUPipelineBase for implicit pipeline layouts 2020-08-19 16:44:26 +05:30
Kunal Mohan
732efdacbd update wgpu 2020-08-16 12:35:38 +05:30
Kunal Mohan
8ff00f0e9c Remove entries from error_command_buffers on drop 2020-08-08 20:20:07 +05:30
Kunal Mohan
1d80f57aab Record errors in GPUCommandEncoder.BeginPass() and EncoderPass.endPass() 2020-08-07 22:36:05 +05:30
Kunal Mohan
072770dbc0 Register invalid resources separately 2020-08-06 10:48:17 +05:30
Kunal Mohan
01c8b24e9f update wgpu 2020-08-06 00:21:45 +05:30
Kunal Mohan
ce6e09a3aa Change ErrorScopeId type to NonZeroU64
And extract it from WebGPURequest
2020-08-03 01:45:29 +05:30
Kunal Mohan
8eff1d74de Record validation error in mapAsync() 2020-08-02 14:25:18 +05:30
Kunal Mohan
cd8d9162e6 Error handling for promise returning operations 2020-08-02 12:45:22 +05:30
Kunal Mohan
8cb5fad828 Report errors from void returning operations 2020-08-01 16:32:37 +05:30
Kunal Mohan
4e38633009 Refactor and improve GPUErrorScopes
Remove use of equivalent BGLs
2020-07-30 23:36:58 +05:30
Kunal Mohan
aff22db33f Implement GPURenderBundleEncoder and GPURenderBundle 2020-07-24 12:45:23 +05:30
Kunal Mohan
75abccb16b update wgpu, use serializable descriptors 2020-07-22 23:22:13 +05:30
Kunal Mohan
5285c07f1f Implement GPUCommandEncoder.copy commands 2020-07-21 21:00:23 +05:30
Kunal Mohan
cdc0a75fe4 Update GPUObjectBase webidl and cleanup valid flags 2020-07-20 23:03:53 +05:30
Kunal Mohan
785497af63 Ensure GPUDevice cleanup in GlobalScope 2020-07-17 21:17:38 +05:30
Kunal Mohan
37d606621d address review comments 2020-07-17 02:23:39 +05:30
Kunal Mohan
0dc1514d57 Implement Async Error reporting for WebGPU and update wgpu-core 2020-07-16 23:21:09 +05:30
bors-servo
ec9308199e
Auto merge of #27180 - kunalmohan:segfault, r=kvark
Remove segfaults in WebGPU threads

<!-- Please describe your changes on the following line: -->
I have also increased the number of staging buffers for presentation.
Segfault occurred at 2 places-
1. RenderPipeline descriptor.
2. BufferMapAsync callback.

r?@kvark

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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. -->
2020-07-06 17:45:09 -04:00
Kunal Mohan
9e7e9433e4 Remove segfaults in WebGPU threads 2020-07-07 01:55:03 +05:30
Kunal Mohan
fae66089fa Implement GPUQueue.writeBuffer and GPUQueue.writeTexture 2020-07-04 21:49:32 +05:30
Kunal Mohan
8ef7f24541 Update wgpu-core and wgpu-types 2020-07-04 13:59:30 +05:30
Kunal Mohan
b672b78e19 WebGPU update presentation data asynchronously 2020-07-03 15:42:08 +05:30
Kunal Mohan
b484836dbc Ensure proper unmap of buffer 2020-06-27 20:27:18 +05:30
Kunal Mohan
ef3b141406 address review comments 2020-06-27 20:27:18 +05:30
Kunal Mohan
b74cea3a46 Implement GPUBuffer.mapAsync and update wgpu-core 2020-06-27 20:27:17 +05:30
Kunal Mohan
48ef306bd3 Update wgpu-core and wgpu-types 2020-06-19 11:12:50 +05:30
Kunal Mohan
00b3f785c4 Add GPUSampler and GPUTextureView to BindingResource
Add validation for BindGroups
2020-06-17 12:45:40 +05:30
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Kunal Mohan
3b5ede153d Update wgpu-core and wgpu-types 2020-06-04 01:19:13 +05:30
Kunal Mohan
1d4efb48ba Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and  GPURenderEncoderBase and
implement relevant methods.
2020-06-04 00:27:58 +05:30
Kunal Mohan
af95d92231 Implement GPUTexture and GPUTextureView 2020-06-01 23:28:12 +05:30
Kunal Mohan
130de8b8e6 Implement GPURenderPipeline
Add webidl for GPURenderPipeline and implement GPUDevice.createRenderPipeline()
2020-05-30 11:38:32 +05:30
Kunal Mohan
f4d0183568 Make WebGPU resource creation fully async
Remove some garbage code in adapter id checks
Prevent panic during shutdown if using WebGPU
2020-05-26 19:16:46 +05:30
Kunal Mohan
dd04716b85 Add GPUSampler to WebGPU implementation
Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method.
2020-05-26 00:00:35 +05:30
Kunal Mohan
39f336b527 Implement client-side logic for WebGPU id recycling 2020-05-22 21:22:19 +05:30
Kunal Mohan
a4f911699a Upgrade wgpu-core version to 0.5.0 and implement server-side logic for wgpu id recycling
Remove current implementation of MapReadAsync
2020-05-21 18:28:49 +05:30
Istvan Miklos
000a5d543d 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.
2020-02-27 15:10:24 +01:00
Istvan Miklos
2df4d9fce4 Implement mapReadAsync function of GPUBuffer
Implemented the `mapReadAsync` and fixed the `unmap` functions of `GPUBuffer`.
Added `mapped` internal slot for tracking the ArrayBuffer/Promise.
Added more states to the `GPUBufferState` enum.
2020-02-25 10:18:36 +01:00
Istvan Miklos
170e9971ac Implement GPUComputePassEncoder functions
Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
2020-02-19 11:19:59 +01:00
Zakor
a3c6810b18 Initial implementation of GPUQueue
Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
2020-02-13 14:37:25 +01:00
Zakor Gyula
4facd3d4d2 Initial implementation of GPUCommandEncoder
Added WebIDL bindings for `GPUCommandEncoder`, `GPUCommandBuffer`, `GPUComputePassEncoder`, `GPUProgrammablePassEncoder`.
Implemented the `beginComputePass`, `copyBufferToBuffer` and `finish` functions of `GPUCommandEncoder`.
Implemented the `createCommandEncoder` function of `GPUDevice`.
2020-02-11 10:20:34 +01:00
Istvan Miklos
9031369c19 Initial implementation of GPUComputePipeline
Added WebIDL bindings for `GPUComputePipeline`.
Implemented the `createComputePipeline` function of `GPUDevice`.
2020-02-11 10:15:03 +01:00
Istvan Miklos
a8621c4ed9 Initial implementation of GPUShaderModule
Added WebIDL bindings for `GPUShaderModule`.
Implemented the `createShaderModule` function of `GPUDevice`.
2020-02-11 10:12:20 +01:00