Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GPUSampler and GPUTextureView to BindingResources and update wgpu-core #26984

Merged
merged 3 commits into from Jun 22, 2020

Conversation

@kunalmohan
Copy link
Collaborator

kunalmohan commented Jun 19, 2020

This also completes validation for GPUBindGroup and GPUBindGroupLayout.
entry_map is stored in GPUBindGroupLayout for validating createBindGroup().

r?@kvark


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___
@highfive
Copy link

highfive commented Jun 19, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/gpubindgrouplayout.rs, components/script/dom/gpusampler.rs, components/script/dom/gpuadapter.rs, components/script/dom/webidls/GPUBindGroupLayout.webidl, components/script/dom/gpucomputepassencoder.rs and 10 more
  • @KiChjang: components/script/dom/gpubindgrouplayout.rs, components/script/dom/gpusampler.rs, components/script/dom/gpuadapter.rs, components/script/dom/webidls/GPUBindGroupLayout.webidl, components/script/dom/gpucomputepassencoder.rs and 10 more
@highfive
Copy link

highfive commented Jun 19, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@kunalmohan kunalmohan added this to In progress in WebGPU MVP via automation Jun 19, 2020
Copy link
Member

kvark left a comment

This needs to do less validation :)
Sorry for not making this clear originally!
The only responsibilities of Servo side would be:

  • managing IDs
  • managing IPC communication
  • converting between DOM WebIDL types/calls and wgpu-core types
  • converting wgpu-core errors to the WebGPU error model

There should be no need to do any validation on Servo side.
Moreover, even if you do the validation in a way it's written here - on the client side, we can't rely on it on the server side, because the content process may be compromised. Therefore, most if not all validation needs to happen on the server side, and we want it in wgpu-core, accessible to all.

components/script/dom/gpudevice.rs Outdated Show resolved Hide resolved
components/script/dom/gpudevice.rs Outdated Show resolved Hide resolved
@kunalmohan
Copy link
Collaborator Author

kunalmohan commented Jun 19, 2020

I have removed validation for GPUBindGroup, GPUBindGroupLayout and GPUPipelineLayout (which is almost all the validation that we had). The only thing that we check now is whether a related resource is in a valid state or not, e.g. while creating BG whether the associated BGL is in a valid state or not.

@kunalmohan kunalmohan requested a review from kvark Jun 19, 2020
@kvark
kvark approved these changes Jun 22, 2020
Copy link
Member

kvark left a comment

Thank you!

@kvark
Copy link
Member

kvark commented Jun 22, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

📌 Commit f973099 has been approved by kvark

bors-servo added a commit that referenced this pull request Jun 22, 2020
Add GPUSampler and GPUTextureView to BindingResources and update wgpu-core

<!-- Please describe your changes on the following line: -->
This also completes validation for `GPUBindGroup` and `GPUBindGroupLayout`.
`entry_map` is stored in `GPUBindGroupLayout` for validating `createBindGroup()`.

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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

Testing commit f973099 with merge c51adf3...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jun 22, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

Testing commit f973099 with merge c4be980...

bors-servo added a commit that referenced this pull request Jun 22, 2020
Add GPUSampler and GPUTextureView to BindingResources and update wgpu-core

<!-- Please describe your changes on the following line: -->
This also completes validation for `GPUBindGroup` and `GPUBindGroupLayout`.
`entry_map` is stored in `GPUBindGroupLayout` for validating `createBindGroup()`.

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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jun 22, 2020

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

Testing commit f973099 with merge 77a7540...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2020

☀️ Test successful - status-taskcluster
Approved by: kvark
Pushing 77a7540 to master...

@bors-servo bors-servo merged commit 77a7540 into servo:master Jun 22, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
WebGPU MVP automation moved this from In progress to Done Jun 22, 2020
@kunalmohan kunalmohan deleted the kunalmohan:gpu-bind-group branch Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
WebGPU MVP
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.