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
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
bors-servo
e5689df6b4
Auto merge of #24694 - servo:rustup, r=jdm
...
Remove use of on_unimplemented
It errors in today’s Nightly:
```rust
error[E0557]: feature has been removed
--> components/script/lib.rs:9:12
|
9 | #![feature(on_unimplemented)]
| ^^^^^^^^^^^^^^^^ feature has been removed
error[E0658]: this is an internal attribute that will never be stable
--> components/script/dom/bindings/conversions.rs:77:1
|
77 | #[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
error: aborting due to 2 previous errors
```
2019-11-09 10:15:30 -05: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
Simon Sapin
94b19beefb
Fix some warnings new in Rust Nightly
2019-11-08 11:45:16 +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
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
1cefae7181
Replace use of gleam in webgl with sparkle.
2019-09-11 11:40:04 -04:00
Alan Jeffrey
133a17e15c
Replace use of callbacks in webxr by channels
2019-07-26 23:36:13 -05: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
Manish Goregaokar
c5a0fc56ea
Use separate IPC-only locking mechanism when locking from webxr
2019-07-11 11:12:59 -07:00
Alan Jeffrey
1b05ad4bb3
WebGLSender doesn't really implement Serializable
2019-07-10 19:06:51 -05:00
Alan Jeffrey
9eb75d4ea6
Use webxr IPC to get a WebXR device registry to each script thread
2019-07-03 08:53:40 -05:00
Alan Jeffrey
91d1b52b38
Initialize a wevxr device registry from Servo
2019-07-02 18:23:56 -05:00
bors-servo
123f58592c
Auto merge of #23226 - mmatyas:webgl_compressed_textures, r=jdm
...
Add initial support for WebGL compressed textures
This patch is an initial implementation of WebGL compressed texture support, it contains
- functions for registering and querying compressed texture extensions
- initial implementation of `CompressedTexImage2D` and `CompressedTexSubImage2D` and their parameter validation
- implementation of S3TC (DXT1, DXT3, DXT5) and ETC1 extensions as examples
What's still missing:
- some of the parameter validation steps are missing
- the pixel comparison tests fail for more complex cases (I'm probably missing something trivial at the GL calls)
Related: #10209 and #20594
cc @jdm @zakorgy
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] Related issues: #10209 , #20594
- [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/23226 )
<!-- Reviewable:end -->
2019-05-21 17:10:24 -04:00
Mátyás Mustoha
7f0b820d4e
Add initial support for WebGL compressed textures
2019-05-21 16:56:40 -04:00
Manish Goregaokar
c1a8605c3d
Allow webvr thread consumers to request input data
2019-05-03 14:37:41 -07: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
Alan Jeffrey
c9087013b1
Use webvr future_frame_data to avoid blocking the WebGL thread
2019-02-26 11:07:42 -06:00
Josh Matthews
25a61f3783
Report all messages processed by the webgl thread.
2019-01-31 14:57:38 -05:00
Anthony Ramine
804d964b7d
Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d
...
This avoids a copy in the case of textures coming from HTMLImageElement.
2018-11-20 10:14:52 +01:00
Anthony Ramine
cfca906ee2
Call rgba8_byte_swap_colors_inplace on the WebGL thread
2018-11-20 10:14:52 +01:00
Anthony Ramine
87c849c0d6
Move prepare_pixels to the canvas thread
...
Nothing else uses it in the whole crate graph.
2018-11-20 10:14:51 +01:00
Anthony Ramine
ca62b5c318
Call prepare_pixels on the WebGL thread
2018-11-20 10:14:50 +01:00
Anthony Ramine
5f9e3d8bb9
Move prepare_pixels to canvas_traits::webgl
2018-11-20 10:14:50 +01:00
Anthony Ramine
2a5539caef
Use Size2D in TexImage2D and TexSubImage2D messages
2018-11-20 10:14:49 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Anthony Ramine
947e5afa0c
Remove some boolean flags in tex_image_2d and tex_sub_image_2d
2018-11-16 12:42:57 +01:00
Anthony Ramine
3f8a3b2887
Simplify define_resource_id
2018-11-16 12:39:21 +01:00
Anthony Ramine
1c89ac90b9
Send alignment info directly in TexImage2D and TexSubImage2d messages
2018-11-16 12:39:20 +01:00
Anthony Ramine
65d1b11929
Make TexImage2D and TexSubImage2D struct variants
2018-11-16 12:38:07 +01:00
Anthony Ramine
a5779ad372
Prefix some pixels functions with rgba8_
2018-11-16 12:37:34 +01:00
Anthony Ramine
adf363a208
Move prepare_pixels helper functions to canvas_traits
2018-11-16 12:37:31 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Keith Yeung
8757cf5bc0
Use question mark operator instead of try
macro with a raw identifier
...
Co-Authored-By: SimonSapin <simon.sapin@exyr.org>
2018-11-06 16:12:04 +01:00
Simon Sapin
45f7199eee
cargo fix --edition
2018-11-06 15:26:02 +01:00
Alan Jeffrey
05391e27cd
Add lots of derived Debug impls
2018-10-29 09:21:37 -05:00
Anthony Ramine
8828925f4f
Properly support gl_PointSize and gl_PointCoord
...
Fixes #21719 .
Fixes #20993 .
Fixes #20992 .
Fixes #21007 .
Fixes #20979 .
2018-10-18 20:15:23 +02:00
Anthony Ramine
6c469b90b1
Share some code between 2D canvas and WebGL
2018-10-09 14:57:02 +02:00