Josh Matthews
3876d6dbdd
webgl: Add missing RGB8 texture format combination.
2020-04-30 00:21:49 -04:00
Mátyás Mustoha
54b100b0f1
webgl: Fix tidy
2020-04-30 00:21:49 -04:00
Josh Matthews
29ab55d076
webgl: Fix support for float/half-float texture formats.
2020-04-30 00:21:49 -04: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
Alan Jeffrey
8bb1732258
Update surfman to 0.2 and remove glutin
2020-04-17 23:44:53 -05:00
bors-servo
23deec8c39
Auto merge of #26147 - jdm:linewidth, r=nox
...
Avoid GL errors with LineWidth commands
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26139
2020-04-14 18:54:00 -04:00
Daniel Alley
865b538115
Remove assertion for negative value from get_uniform_location
...
closes #26150
2020-04-09 22:25:57 -04:00
bors-servo
37023b24f2
Auto merge of #26136 - asajeffrey:goodbye-webvr, r=Manishearth
...
Remove WebVR
<!-- Please describe your changes on the following line: -->
Removes support for WebVR. WebXR is our future!
---
<!-- 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 do not require tests because how do you test
<!-- 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-08 23:02:50 -04:00
Alan Jeffrey
c611e46381
Remove WebVR
2020-04-08 20:23:41 -05:00
Josh Matthews
16d67b1283
webgl: Avoid GL errors with LineWidth commands.
2020-04-08 12:54:12 -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
Istvan
bfa43fbeba
Add support for DrawRangeElements in WebGL2
...
Adds initial support for the WebGL2 `DrawRangeElements` call.
2020-03-30 13:55:01 +02: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
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
bors-servo
b4d7ec1c99
Auto merge of #25855 - jdm:surface-inversion, r=Manishearth,asajeffrey
...
Remove GL->d3d blit in HoloLens immersive mode
Depends on:
* https://github.com/servo/surfman/pull/151
* https://github.com/asajeffrey/surfman-chains/pull/7
* https://github.com/servo/webxr/pull/133
These changes add two extra APIs for embedders to use when registering a WebXR device - one to allow running any closure as a task in the webgl thread, and one to register an arbitrary surface provider for a particular webxr session. When an openxr session is started, it can then obtain the webgl thread's d3d device from that thread's surfman device and ensure that openxr uses it.
Surface providers are traits that have their methods invoked by the webgl thread as part of the the normal swapchain operations. This allows the openxr surface provider to return surfaces that wrap the underlying openxr textures, which are valid in the webgl thread and can be used as the target of an opaque framebuffer.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25735
- [x] These changes do not require tests because there are no windows immersive mode tests
2020-03-09 19:58:21 -04:00
Josh Matthews
fbcf2bbc3e
Integrate swapchain surface provider changes into webgl and webxr implementations.
2020-03-09 17:50:54 -04: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
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