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
Anthony Ramine
a3392610c3
Make HTMLCanvasElement::get_size return a Size2D<u32>
...
The changes keep trickling down.
2018-10-02 14:21:06 +02:00
Josh Matthews
5dc80dd07a
webgl: Add feature to store backtraces for each WebGL API call for easier debugging.
2018-10-01 10:43:13 +02:00
Anthony Ramine
d5f3b211ba
Properly support PACK_ALIGNMENT in WebGL 1
2018-09-12 23:45:49 +02:00
Josh Matthews
1b08dd5232
webgl: Move framebuffer initialization logic to WebGL thread.
2018-09-10 16:31:29 -04:00
Anthony Ramine
4bd8efa49e
Use byte channels to send textures to the WebGL thread
2018-09-08 13:42:06 +02:00
Anthony Ramine
408e540c55
Use ipc::bytes_channel in ReadPixels
2018-09-08 13:42:06 +02:00
Anthony Ramine
9f924013bc
Use a bytes channel in BufferData
...
This means we don't need to copy the input ArrayBuffer at all on the DOM side.
2018-09-07 11:28:59 +02:00
Anthony Ramine
e37856a855
Remove Clone impl for WebGLMsg
2018-09-07 11:28:45 +02:00
Anthony Ramine
8b1c753c6c
Properly check limit in gl.activeTexture()
2018-08-23 15:15:33 +02:00
Anthony Ramine
04c81c5cc3
Merge code from Draw* and Draw*Instanced methods
...
This made me realise we weren't supporting OES_element_index_uint in the
ANGLE_instanced_arrays extension.
2018-08-02 22:54:39 +02:00
Anthony Ramine
f7124886bc
Use the DOM cache for gl.getTexParameter(gl.TEXTURE_*_FILTER)
...
Part of #20596 .
2018-08-02 18:06:58 +02:00
Anthony Ramine
76f23f7d78
Simplify gl.getShaderParameter() ( fixes #20562 )
...
The expectation change is due to the shader now using its DOM-side compile status.
It is actually a bug for the shader to think it actually compiled successfully,
but at least it does so consistently now.
2018-07-31 11:12:45 +02:00
Anthony Ramine
5a9ad01145
Cache which capabilities are enabled in the context ( fixes #20534 )
...
This is needed for #20555 .
2018-07-25 19:58:02 +02:00
Anthony Ramine
3e8c2d659a
Implement gl.getUniform()
2018-07-18 21:37:41 +02:00