aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgl2renderingcontext.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Auto merge of #26354 - jdm:mmatyas__webgl_fns_getparam2, r=jdmbors-servo2020-04-291-17/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for some more WebGL2 limit parameters Adds support for the following new WebGL2 GetParameter values: - `MAX_ELEMENT_INDEX` - `MAX_ELEMENTS_INDICES` - `MAX_ELEMENTS_VERTICES` - `MAX_FRAGMENT_INPUT_COMPONENTS` - `MAX_SAMPLES` - `MAX_SERVER_WAIT_TIMEOUT` - `MAX_TEXTURE_LOD_BIAS` - `MAX_VARYING_COMPONENTS` - `MAX_VERTEX_OUTPUT_COMPONENTS` See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
| * Add support for some more WebGL2 limit parametersMátyás Mustoha2020-04-291-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for the following new WebGL2 GetParameter values: - `MAX_ELEMENT_INDEX` - `MAX_ELEMENTS_INDICES` - `MAX_ELEMENTS_VERTICES` - `MAX_FRAGMENT_INPUT_COMPONENTS` - `MAX_SAMPLES` - `MAX_SERVER_WAIT_TIMEOUT` - `MAX_TEXTURE_LOD_BIAS` - `MAX_VARYING_COMPONENTS` - `MAX_VERTEX_OUTPUT_COMPONENTS` See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
* | Add support for WebGL2 buffer types in GetBufferParameterMátyás Mustoha2020-04-281-2/+4
| | | | | | | | | | This makes the new buffer types introduced in WebGL2 usable by the GetBufferParameter call.
* | Auto merge of #26289 - he4d:master, r=jdmbors-servo2020-04-241-9/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced failible boolean with an enum <!-- Please describe your changes on the following line: --> Replaced the boolean `fallible` argument of some WebGL object methods with the new `enum Operation { Fallible, Infallible }` that was added to the `webglrenderingcontext`. This improves the readability of that methods. --- <!-- 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] These changes fix #26047 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because the issue says so <!-- 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. -->
| * | Replaced failible boolean with an enumTobias Tschinkowitz2020-04-231-9/+9
| | |
* | | webgl: Update IDL from upstream to avoid overloading issues.Josh Matthews2020-04-231-45/+46
|/ /
* / Fix InvalidateSubFramebuffer error handlingMátyás Mustoha2020-04-221-1/+1
|/ | | | | The WebGL2 InvalidateSubFramebuffer function should generate INVALID_VALUE when width or height is negative.
* Automatically enable WebGL 2 for specific domains.Josh Matthews2020-04-151-1/+22
|
* webgl: Only error when beginning transform feedback on programs that have no ↵Josh Matthews2020-04-081-1/+1
| | | | varying values.
* webgl: Fix active uniform block length check.Josh Matthews2020-04-071-1/+2
|
* Add initial support for VertexAttribI4*, VertexAttribIPointerIstvan2020-04-071-1/+133
| | | | Adds initial support for the WebGL2 `VertexAttribI4i`, `VertexAttribI4iv`, `VertexAttribI4ui`, `VertexAttribI4uiv` and `VertexAttribIPointer` calls.
* Update euclidManish Goregaokar2020-04-071-2/+1
|
* Auto merge of #26025 - szeged:webgl_draw_range_elements, r=jdmbors-servo2020-03-301-0/+68
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for DrawRangeElements in WebGL2 Adds initial support for the WebGL2 `DrawRangeElements` call. <!-- Please describe your changes on the following line: --> I have started working on this function, but not sure how could I check for the Uniform Block Backing (https://www.khronos.org/registry/webgl/specs/latest/2.0/#ACTIVE_UNIFORM_BLOCK_BACKING). I am looking for some advice. --- <!-- 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 cc @mmatyas @zakorgy @jdm <!-- 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. -->
| * Add support for DrawRangeElements in WebGL2Istvan2020-03-301-0/+68
| | | | | | | | Adds initial support for the WebGL2 `DrawRangeElements` call.
* | Make LayoutCanvasWebGLRenderingContextHelpers methods take selfAnthony Ramine2020-03-291-1/+1
|/
* Auto merge of #26048 - nox:layout-2020-transparent-data, r=jdmbors-servo2020-03-281-1/+1
|\ | | | | | | Give a lifetime parameter to LayoutDom
| * Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
| |
* | Auto merge of #25998 - jdm:vao-drop, r=noxbors-servo2020-03-271-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | Avoid a panic when closing webgl pages using VAOs - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25891 - [x] These changes do not require tests because GC behaviour at shutdown is nondeterministic and difficult to test
| * webgl: Ignore webgl communication errors when dropping vertex array objects.Josh Matthews2020-03-191-3/+3
| |
* | Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-4/+2
|/
* Do not try to read pixels from an FBO without read bufferMátyás Mustoha2020-03-171-1/+5
| | | | | | Adds another check to the WebGL2 ReadPixels implementation to fix an OpenGL invalid operation crash when the method is called on a bound framebuffer that has no read buffer.
* Add support for WebGL2 read and draw buffer settingsMátyás Mustoha2020-03-161-0/+69
| | | | | | | | | | | Adds support for the `ReadBuffer` and `DrawBuffers` WebGL2 calls and the related parameter getters. See: - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2 - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4 - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
* webgl: Don't panic on sampler3D and sampler2DArray uniforms.Josh Matthews2020-03-131-0/+3
|
* Add support for some more WebGL2 renderbuffer functionsMátyás Mustoha2020-03-131-2/+57
| | | | | | | | | Adds support for the following WebGL2 calls: - `RenderbufferStorageMultisample` - `GetInternalFormativ` See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.5
* Add VertexArrayObject support for WebGL2Istvan Miklos2020-03-131-1/+41
| | | | | | The implementation was already in place for OpenGL ES. My approach with this patch is to add support for WebGL2 by sharing the implementation between the WebGL2 and GLES.
* Add support for WebGL2 GetIndexedParameterMátyás Mustoha2020-03-101-20/+115
| | | | | | Adds support for the `GetIndexedParameter` WebGL2 call. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
* Add support for WebGL2 GetFragDataLocationMátyás Mustoha2020-03-091-0/+6
| | | | | | Adds support for the `GetFragDataLocation` WebGL2 call. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7
* Update SpiderMonkeyAnthony Ramine2020-03-061-0/+1
|
* Add support for WebGL2 FramebufferTextureLayerMátyás Mustoha2020-03-041-0/+30
| | | | | | Adds support for `FramebufferTextureLayer` WebGL2 call. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
* Add support for WebGL2 framebuffer invalidationMátyás Mustoha2020-03-031-0/+84
| | | | | | | Adds support for the `invalidateFramebuffer` and `invalideSubFramebuffer` WebGL2 calls. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
* Add support for WebGL2 clear buffer operationsMátyás Mustoha2020-02-241-0/+132
| | | | | | | | | | | Adds support for the following WebGL2 methods: - `clearBufferfv` - `clearBufferiv` - `clearBufferuiv` - `clearBufferfi` See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
* Add support for WebGL2 getFramebufferAttachmentParameterMátyás Mustoha2020-02-211-3/+179
| | | | | | | Implements the WebGL2 variant of `getFramebufferAttachmentParameter` and the related parameter checks. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
* Add support for WebGL2 framebuffer attachmentsMátyás Mustoha2020-02-211-4/+50
| | | | | Adds an initial implementation for the framebuffer attachments introduced with WebGL2 and the related enums and constrains checks.
* Add initial support for WebGL2 read framebufferMátyás Mustoha2020-02-141-2/+47
| | | | | Adds support for binding to the read framebuffer slot and querying its status.
* Add support for WebGL2 `MAX_COLOR_ATTACHMENTS` and `MAX_DRAW_BUFFERS`Mátyás Mustoha2020-02-141-0/+2
| | | | | | | 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
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+2
|
* Auto merge of #25545 - szeged:mmatyas__webgl_fns_versions, r=jdmbors-servo2020-01-171-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add WebGL2 specific version strings Updated the `VERSION` and `SHADING_LANGUAGE_VERSION` WebGL parameters to report the correct version strings when WebGL2 is in use. 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 @imiklos --- <!-- 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. -->
| * Add WebGL2 specific version stringsMátyás Mustoha2020-01-171-0/+10
| | | | | | | | | | | | | | Updated the `VERSION` and `SHADING_LANGUAGE_VERSION` WebGL parameters to report the correct version strings when WebGL2 is in use. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
* | Auto merge of #25543 - szeged:mmatyas__webgl_fns_uniforms_p3, r=jdmbors-servo2020-01-171-4/+217
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for WebGL2 uniform matrix operations Adds support for the `uniformMatrix[234]x[234]fv` WebGL2 functions. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8 <!-- Please describe your changes on the following line: --> Note: Similarly to #25538, some of the functions here also overlap with their WebGL 1 variant. cc @jdm @zakorgy @imiklos --- <!-- 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. -->
| * | Add support for WebGL2 uniform matrix operationsMátyás Mustoha2020-01-171-4/+217
| |/ | | | | | | | | | | Adds support for the `uniformMatrix[234]x[234]fv` WebGL2 functions. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8
* | Auto merge of #25538 - szeged:mmatyas__webgl_fns_uniforms_p2, r=jdmbors-servo2020-01-161-46/+51
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for WebGL2 uniform array operations Adds support for the WebGL2 overloads of `uniform[1234][if]v`. <!-- Please describe your changes on the following line: --> WebGL2 adds two optional parameters for the `uniform[1234][if]v` functions to allow specifying input data ranges. However, because they have the same name and overlapping parameters, the Codegen cannot make a difference between their GL1 and 2 variants. As a workaround, I've added the new parameters to the WebGL1 side, which which isn't strictly what the spec says, but shouldn't break things either. (Note: Firefox devs also run into this issue: [[1](https://searchfox.org/mozilla-central/source/dom/webidl/WebGLRenderingContext.webidl#794), [2](https://bugzilla.mozilla.org/show_bug.cgi?id=1324543)]). cc @jdm @zakorgy @imiklos --- <!-- 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. -->
| * Add support for WebGL2 uniform array operationsMátyás Mustoha2020-01-161-46/+51
| | | | | | | | Adds support for the WebGL2 overloads of `uniform[1234][if]v`.
* | Auto merge of #25519 - szeged:mmatyas__webgl_fns_uniforms, r=jdmbors-servo2020-01-151-4/+222
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for WebGL2 unsigned uniform operations This adds support for the WebGL2 `uniform[1234]ui` and `uniform[1234]uiv` operations. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8 <!-- Please describe your changes on the following line: --> cc @jdm @zakorgy @imiklos --- <!-- 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. -->
| * Add support for WebGL2 unsigned uniform operationsMátyás Mustoha2020-01-151-4/+222
| | | | | | | | | | | | | | This adds support for the WebGL2 `uniform[1234]ui` and `uniform[1234]uiv` operations. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.8
* | Add support for WebGL2 `RASTERIZER_DISCARD` enum.Mátyás Mustoha2020-01-141-4/+21
|/ | | | | | | Add support for the `RASTERIZER_DISCARD` enum for the WebGL2 version of the `Enable`, `Disable` and `IsEnabled` functions. See https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
* Add initial support for WebGL2 uniform buffer functionsMátyás Mustoha2020-01-091-15/+342
| | | | | | | | | | | | | | | Adds initial support for the following WebGL2 calls: - bindBufferBase - bindBufferRange - getUniformIndices - getUniformBlockIndex - getActiveUniforms - getActiveUniformBlockParameter - getActiveUniformBlockName - uniformBlockBinding See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.16
* Add support for WebGL2 ReadPixels functionsMátyás Mustoha2019-11-261-7/+360
| | | | | | | Adds support for the new ReadPixels functions introduced with WebGL2 and the relevant PixelStorei parameters. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.10
* Add Support for WebGL TransormfeedbackIstvan Miklos2019-11-081-2/+232
| | | | Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
* Implement the basic WebGL2 buffer data operationsMátyás Mustoha2019-11-051-8/+309
| | | | | | | Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
* Use surfman for managing GL surfacesPatrick Walton2019-11-011-1/+1
| | | | | | Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com> Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu> Co-authored-by: Josh Matthews <josh@joshmatthews.net>