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. -->
This commit is contained in:
bors-servo 2020-02-18 13:15:25 -05:00 committed by GitHub
commit fe471de33b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 192 additions and 0 deletions

View file

@ -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 {