diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2020-02-18 13:15:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 13:15:25 -0500 |
commit | fe471de33bb73b6fb1d0150e7bac87eb2bb996ba (patch) | |
tree | 9dc91dcdc0ad6215f8866d1dbc5b9cbdd44f691d /components/script | |
parent | ec75a8dfd1b5d354c89640bedb22802295b48684 (diff) | |
parent | 833485887e9e8a4ae4beb71c473df101a4106ee4 (diff) | |
download | servo-fe471de33bb73b6fb1d0150e7bac87eb2bb996ba.tar.gz servo-fe471de33bb73b6fb1d0150e7bac87eb2bb996ba.zip |
Auto merge of #25752 - szeged:mmatyas__webgl_fns_framebuf_glparams, r=jdm
Add support for WebGL2 `MAX_COLOR_ATTACHMENTS` and `MAX_DRAW_BUFFERS`
Adds support for using the WebGL2 enums `MAX_COLOR_ATTACHMENTS` and `MAX_DRAW_BUFFERS` with `GetParameter`.
See https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
<!-- Please describe your changes on the following line: -->
cc @jdm @zakorgy
---
<!-- 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
- [x] There are tests for these changes
<!-- 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')
-rw-r--r-- | components/script/dom/webgl2renderingcontext.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index 2d782d8604f..71f1f108b39 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -535,6 +535,8 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { constants::UNIFORM_BUFFER_OFFSET_ALIGNMENT => { Some(self.base.limits().uniform_buffer_offset_alignment) }, + constants::MAX_COLOR_ATTACHMENTS => Some(self.base.limits().max_color_attachments), + constants::MAX_DRAW_BUFFERS => Some(self.base.limits().max_draw_buffers), _ => None, }; if let Some(limit) = limit { |