Commit graph

131 commits

Author SHA1 Message Date
bors-servo
813be91926
Auto merge of #25863 - servo:synup, r=jdm
Remove syn 0.15 from our crate graph
2020-03-05 10:03:48 -05:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +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
Manish Goregaokar
f3e1aba4e3 Add profiling for WebXR 2020-02-22 22:00:05 -08:00
Mátyás Mustoha
7d5048f885 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
2020-01-17 11:42:45 +01:00
Mátyás Mustoha
bc914381a8 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
2020-01-15 13:48:35 +01:00
Mátyás Mustoha
da94f8d0e7 Add initial support for WebGL2 uniform buffer functions
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
2020-01-09 11:17:50 +01:00
Josh Matthews
156ad646a0 webgl: Set more ANGLE shader translation properties for WebGL 2. 2020-01-07 10:22:40 -05:00
Alan Jeffrey
44db86fefd Add extra debug assertions for WebGL errors 2019-12-06 14:56:46 -06:00
Mátyás Mustoha
8fefa23019 Add support for WebGL2 ReadPixels functions
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
2019-11-26 16:09:13 +01:00
Alan Jeffrey
124de75089 Avoid recompiling script every time surfman changes 2019-11-18 09:40:58 -06:00
bors-servo
31ee5fc2f5
Auto merge of #24676 - Manishearth:unpatch, r=jdm
Remove patched webxr

Unsure if this compiles yet, testing locally.

r? @jdm
2019-11-11 19:25:22 -05:00
Manish Goregaokar
2436bd195a Update surfman to use Git version 2019-11-11 12:29:05 -08:00
Manish Goregaokar
51bf8fcfe3 Remove patched webxr 2019-11-08 09:49:52 -08:00
Istvan Miklos
4f112b1705 Add Support for WebGL Transormfeedback
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
2019-11-08 15:22:52 +01:00
Mátyás Mustoha
4050b7f9ec Implement the basic WebGL2 buffer data operations
Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData`
and `getBufferSubData`.

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
2019-11-05 11:33:13 +01:00
Patrick Walton
a358bca766 Use surfman for managing GL surfaces
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>
2019-11-01 08:47:11 -05:00
Josh Matthews
c53680b282 webgl: Lazily clear the canvas right before the first webgl command of the next frame. 2019-10-10 09:57:20 -04:00
Josh Matthews
4d7110aca5 webgl: Clear the drawing buffer when preserveDrawingBuffer is false. 2019-10-09 10:27:47 -04:00
Mátyás Mustoha
26df1962c3 Add WebGLSampler support
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13
2019-10-08 16:21:43 +02:00
Istvan Miklos
248545ddda Initial implementation of WebGLSync
This patch adds initial support for WebGLSync.

Note:
There is no test for the isSync, deleteSync and waitSync functions in the `conformance2/sync/sync-webgl-specific.html`.
2019-10-02 12:51:32 +02:00
Mátyás Mustoha
f2e2b3d34b Initial implementation of WebGLQueries
This patch adds initial support for WeGLQueries. Most related WebGL
functions and objects are implemented [1]. What's still missing is
the `EXT_disjoint_timer_query_webgl2` support.

[1]: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.12
2019-10-01 12:30:24 +02:00
Josh Matthews
5bd1e86d42 webxr: Use the same texture format as the original GL context's framebuffer when creating an XR GL layer. 2019-09-20 01:28:22 -04:00
Josh Matthews
0d88c13186 webgl: Support vertex array objects on macOS. 2019-09-13 16:20:41 -04:00
Josh Matthews
1cefae7181 Replace use of gleam in webgl with sparkle. 2019-09-11 11:40:04 -04:00
Alan Jeffrey
1e3b08aae8 Fallback to old extensions API if NUM_EXTENSIONS errors 2019-09-03 11:03:45 -05:00
Mátyás Mustoha
736f6859b0 Fix extension querying when using WebGL2
This patch fixes a crash caused by using a deprecated GL call.
Starting with OpenGL 3 (used by WebGL2), the `glGetString(GL_EXTENSIONS)`
call is deprecated, and some drivers produce GL_INVALID_ENUM error.
Querying can be done by checking the number of extensions first,
then getting the extensions one by one.
2019-08-26 15:12:43 +02:00
Josh Matthews
25b20ebfc6
Drop webgl main thread data during shutdown. 2019-07-29 08:15:59 -04:00
Alan Jeffrey
133a17e15c Replace use of callbacks in webxr by channels 2019-07-26 23:36:13 -05:00
Alan Jeffrey
0178fcae4e When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread 2019-07-26 17:39:40 -05:00
Josh Matthews
a2ca3ddbd9 Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
Josh Matthews
39d13d1fc8 Support running WebGL in its own thread or on the main thread. 2019-07-25 23:05:03 -04:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Josh Matthews
dbaed5ed92 Make GL/GLES decisions based on the API in use. 2019-07-12 13:36:44 -04:00
bors-servo
df73c71fb1
Auto merge of #23516 - pcwalton:webrenderup, r=pcwalton,jdm
Upgrade WebRender

This is against an old Servo because I can't build current Servo due to compile errors in RNG crates. I verified that it starts up.

---
<!-- 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 #23516
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23516)
<!-- Reviewable:end -->
2019-07-12 08:10:31 -04:00
Manish Goregaokar
c5a0fc56ea Use separate IPC-only locking mechanism when locking from webxr 2019-07-11 11:12:59 -07:00
Patrick Walton
2f9c9cefdb WebRender units are no longer reexported. 2019-07-09 10:50:27 -04:00
Fernando Jiménez Moreno
0da87ad169 Introduce WebrenderExternalImageRegistry 2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
ba9cf85fb3 Webrender external image handler demux 2019-07-04 10:26:47 +02:00
Mátyás Mustoha
7f0b820d4e Add initial support for WebGL compressed textures 2019-05-21 16:56:40 -04:00
bors-servo
34a5a824b8
Auto merge of #23000 - jdm:invisible-webgl, r=nox
Make webgl behave better with session history

This prevents the compositor from animating pages that are not actually visible, so pages using webgl do not needlessly impact the performance of the rest of the browser. Additionally, this fixes a problem that was alluded to in [this code](b5228c098b/src/draw_buffer.rs (L282-L285)), causing Servo to delete arbitrary resources when a GC occurred in content that used three.js.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22987 and fix #22977 and fix #20934 and fix #20953 and fix #20930 and fix #20950 and fix #20924
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23000)
<!-- Reviewable:end -->
2019-03-08 10:46:52 -05:00
Josh Matthews
056edbbd15 Ensure that removed contexts are made active before removal. 2019-03-08 09:49:52 -05:00
Josh Matthews
3121f42d52 Remove offscreen_gl_context dependency from canvas_traits and script. 2019-03-07 09:27:36 -05:00
Alan Jeffrey
8ddde7eacc Pass the GL context to the VRDisplay when rendering 2019-02-27 08:57:02 -06:00
Josh Matthews
25a61f3783 Report all messages processed by the webgl thread. 2019-01-31 14:57:38 -05:00
Josh Matthews
878f020013 Ensure that resized GL contexts do not destroy their resources while in use by WR. 2019-01-17 22:44:41 -05:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00