Commit graph

93 commits

Author SHA1 Message Date
Samson
604979e367
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* Remove script_plugins

* Use crown instead of script_plugins

* crown_is_not_used

* Use crown in command base

* bootstrap crown

* tidy happy

* disable sccache

* Bring crown in tree

* Install crown from tree

* fix windows ci

* fix warning

* fix mac

libscript_plugins.dylib is not available anymore

* Update components/script/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* Update for nightly-2023-03-18

Mostly just based off https://github.com/servo/servo/pull/30630

* Always install crown

it's slow only when there is new version

* Run crown test with `mach test-unit`

* Small fixups; better trace_in_no_trace tests

* Better doc

* crown in config.toml

* Fix tidy for real

* no sccache on rustc_wrapper

* document rustc overrides

* fixup of compiletest

* Make a few minor comment adjustments

* Fix a typo in python/servo/platform/base.py

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>

* Proper test types

* Ignore tidy on crown/tests

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-12-01 15:50:52 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Josh Matthews
5c4939599e Update mozjs. 2021-02-18 09:35:45 -05:00
Josh Matthews
795560ad52 webgl: Add stub isContextLost API. 2020-07-03 14:47:06 -04:00
Istvan Miklos
6591fa54f9 Add support for WebGL2 TexImage2D
Adds initial support for one of the WebGL2 `TexImage2D` call.
2020-06-18 09:59:04 +02:00
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Istvan Miklos
b298160ff2 Add support for WebGL2 TexImage2D
Adds initial support for one of the WebGL2 `TexImage2D` call.
2020-05-26 11:33:58 +02:00
Istvan Miklos
035cb6ebaa Add support for WebGL2 TexImage2D
Adds initial support for one of the WebGL2 `TexImage2D` call.
2020-05-21 10:49:51 +02:00
bors-servo
d08c4fff15
Auto merge of #26336 - szeged:mmatyas__webgl_fns_getparam4, r=jdm
Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET

Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property (ie. stores it as a signed integer) and adds support for querying it using 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

Depends on #26333 because they touch the same test files.

---
<!-- 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. -->
2020-05-01 13:30:05 -04:00
Mátyás Mustoha
1431a389da Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET
Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property
(ie. stores it as a signed integer) and adds support for querying it
using GetParameter.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-30 10:11:11 +02:00
Mátyás Mustoha
8789a6a8d8 Add support for WebGL2 TexStorage2D
Adds initial support for the WebGL2 `TexStorage2D` call, adds
support for the related texture enums and enables some of the
texture tests.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.6
2020-04-30 00:21:48 -04:00
bors-servo
3bedd44026
Auto merge of #26354 - jdm:mmatyas__webgl_fns_getparam2, r=jdm
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
2020-04-29 23:49:55 -04:00
Mátyás Mustoha
c5f0bff99e 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
2020-04-29 14:49:04 -04:00
Mátyás Mustoha
2810c8d413 Add support for WebGL2 buffer types in GetBufferParameter
This makes the new buffer types introduced in WebGL2 usable by the
GetBufferParameter call.
2020-04-28 14:06:02 +02:00
bors-servo
25220049d9
Auto merge of #26289 - he4d:master, r=jdm
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. -->
2020-04-24 02:04:07 -04:00
Josh Matthews
1ce68eb4ea webgl: Update IDL from upstream to avoid overloading issues. 2020-04-23 16:13:56 -04:00
Tobias Tschinkowitz
9c343fcc96 Replaced failible boolean with an enum 2020-04-23 18:23:01 +02:00
Mátyás Mustoha
a90f034976 Fix InvalidateSubFramebuffer error handling
The WebGL2 InvalidateSubFramebuffer function should generate
INVALID_VALUE when width or height is negative.
2020-04-22 12:45:56 +02:00
Josh Matthews
e2845a6939 Automatically enable WebGL 2 for specific domains. 2020-04-15 17:26:42 -04:00
Josh Matthews
9673091d7a webgl: Only error when beginning transform feedback on programs that have no varying values. 2020-04-08 12:43:11 -04:00
Josh Matthews
66b2b3293d webgl: Fix active uniform block length check. 2020-04-07 16:16:05 -04:00
Istvan
62f00df79d Add initial support for VertexAttribI4*, VertexAttribIPointer
Adds initial support for the WebGL2 `VertexAttribI4i`, `VertexAttribI4iv`, `VertexAttribI4ui`, `VertexAttribI4uiv` and `VertexAttribIPointer` calls.
2020-04-07 15:01:39 -04:00
Manish Goregaokar
fccfff11c5 Update euclid 2020-04-07 08:51:08 -07:00
bors-servo
69004e43dd
Auto merge of #26025 - szeged:webgl_draw_range_elements, r=jdm
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. -->
2020-03-30 13:59:05 -04:00
Istvan
bfa43fbeba Add support for DrawRangeElements in WebGL2
Adds initial support for the WebGL2 `DrawRangeElements` call.
2020-03-30 13:55:01 +02:00
Anthony Ramine
d87444cb1f Make LayoutCanvasWebGLRenderingContextHelpers methods take self 2020-03-29 17:52:34 +02:00
bors-servo
15d8c6058b
Auto merge of #26048 - nox:layout-2020-transparent-data, r=jdm
Give a lifetime parameter to LayoutDom
2020-03-28 13:37:31 -04:00
Anthony Ramine
dba6a635e5 Give a lifetime parameter to LayoutDom 2020-03-28 15:37:57 +01:00
bors-servo
a927f1ad8a
Auto merge of #25998 - jdm:vao-drop, r=nox
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
2020-03-27 09:55:12 -04:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Josh Matthews
3a3397fbce webgl: Ignore webgl communication errors when dropping vertex array objects. 2020-03-19 23:34:26 -04:00
Mátyás Mustoha
a6359fe587 Do not try to read pixels from an FBO without read buffer
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.
2020-03-17 10:55:41 +01:00
Mátyás Mustoha
0afe27ef18 Add support for WebGL2 read and draw buffer settings
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
2020-03-16 12:17:15 +01:00
Josh Matthews
6cdbab5581 webgl: Don't panic on sampler3D and sampler2DArray uniforms. 2020-03-13 14:05:34 -04:00
Mátyás Mustoha
5eaa9ef8cb Add support for some more WebGL2 renderbuffer functions
Adds support for the following WebGL2 calls:

- `RenderbufferStorageMultisample`
- `GetInternalFormativ`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.5
2020-03-13 13:43:30 -04:00
Istvan Miklos
1b4a3d8987 Add VertexArrayObject support for WebGL2
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.
2020-03-13 11:38:28 -04:00
Mátyás Mustoha
215dd0a1d8 Add support for WebGL2 GetIndexedParameter
Adds support for the `GetIndexedParameter` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-03-10 11:02:41 +01:00
Mátyás Mustoha
ced67af6b2 Add support for WebGL2 GetFragDataLocation
Adds support for the `GetFragDataLocation` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7
2020-03-09 12:59:30 +01:00
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +01:00
Mátyás Mustoha
8389189d94 Add support for WebGL2 FramebufferTextureLayer
Adds support for `FramebufferTextureLayer` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
2020-03-04 10:07:13 +01:00
Mátyás Mustoha
cc07d930c8 Add support for WebGL2 framebuffer invalidation
Adds support for the `invalidateFramebuffer` and `invalideSubFramebuffer`
WebGL2 calls.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
2020-03-03 14:54:17 +01:00
Mátyás Mustoha
8701d45715 Add support for WebGL2 clear buffer operations
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
2020-02-24 10:57:46 +01:00
Mátyás Mustoha
d5d0a788e3 Add support for WebGL2 getFramebufferAttachmentParameter
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
2020-02-21 17:30:03 +01:00
Mátyás Mustoha
b41805a920 Add support for WebGL2 framebuffer attachments
Adds an initial implementation for the framebuffer attachments
introduced with WebGL2 and the related enums and constrains checks.
2020-02-21 11:04:30 +01:00
Mátyás Mustoha
796ee70597 Add initial support for WebGL2 read framebuffer
Adds support for binding to the read framebuffer slot and querying
its status.
2020-02-14 12:10:16 +01:00
Mátyás Mustoha
833485887e 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
2020-02-14 11:03:28 +01:00
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
bors-servo
893fce1374
Auto merge of #25545 - szeged:mmatyas__webgl_fns_versions, r=jdm
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. -->
2020-01-17 13:55:51 -05:00
bors-servo
f200e21064
Auto merge of #25543 - szeged:mmatyas__webgl_fns_uniforms_p3, r=jdm
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. -->
2020-01-17 12:55:14 -05:00
Mátyás Mustoha
01ca317235 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
2020-01-17 12:10:13 +01:00