diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-06-01 20:53:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 20:53:20 -0400 |
commit | 2b24cfed10e01d91dd44a1015cc553a0fc09bbab (patch) | |
tree | 558306e4c353131ae6129b357b29cffc9e75c1f6 /components/script/dom/webidls/GPUTextureView.webidl | |
parent | c30fcd94e69fde76bc0315eae5652a93dbd9f1ec (diff) | |
parent | af95d922315974dcfae5659b503a672b19026fdb (diff) | |
download | servo-2b24cfed10e01d91dd44a1015cc553a0fc09bbab.tar.gz servo-2b24cfed10e01d91dd44a1015cc553a0fc09bbab.zip |
Auto merge of #26742 - kunalmohan:gpu-texture, r=kvark
Implement GPUTexture and GPUTextureView
<!-- Please describe your changes on the following line: -->
This also include changes to CodegenRust.py to allow enum values starting with digits.
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. -->
Diffstat (limited to 'components/script/dom/webidls/GPUTextureView.webidl')
-rw-r--r-- | components/script/dom/webidls/GPUTextureView.webidl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/components/script/dom/webidls/GPUTextureView.webidl b/components/script/dom/webidls/GPUTextureView.webidl new file mode 100644 index 00000000000..91d2b31ee93 --- /dev/null +++ b/components/script/dom/webidls/GPUTextureView.webidl @@ -0,0 +1,34 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// https://gpuweb.github.io/gpuweb/#gputextureview +[Exposed=(Window, DedicatedWorker), Pref="dom.webgpu.enabled"] +interface GPUTextureView { +}; +GPUTextureView includes GPUObjectBase; + +dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase { + GPUTextureFormat format; + GPUTextureViewDimension dimension; + GPUTextureAspect aspect = "all"; + GPUIntegerCoordinate baseMipLevel = 0; + GPUIntegerCoordinate mipLevelCount = 0; + GPUIntegerCoordinate baseArrayLayer = 0; + GPUIntegerCoordinate arrayLayerCount = 0; +}; + +enum GPUTextureViewDimension { + "1d", + "2d", + "2d-array", + "cube", + "cube-array", + "3d" +}; + +enum GPUTextureAspect { + "all", + "stencil-only", + "depth-only" +}; |