Commit graph

109 commits

Author SHA1 Message Date
Anthony Ramine
99b6091b7a Clean up create_webgl_context 2018-10-02 14:21:06 +02:00
bors-servo
57053e03bb
Auto merge of #21825 - jdm:backtrace-helpers, r=Manishearth
Optional backtraces for JS errors and WebGL errors

This adds two new build-time features to enable useful debugging tools when investigating why JS and WebGL content isn't working. They're optional because they're quite heavyweight.

---
- [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 they're optional developer features.

<!-- 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/21825)
<!-- Reviewable:end -->
2018-10-02 06:57:38 -04:00
Josh Matthews
26e1001efd
Remove trailing whitespace. 2018-10-01 13:32:34 +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
Josh Matthews
e5892989ca
Warn when using slow WebGL code path. 2018-09-27 18:44:02 -04:00
Anthony Ramine
6e4bf750a4 Kill WebGLThreadObserver 2018-09-12 23:46:49 +02:00
Josh Matthews
1b08dd5232 webgl: Move framebuffer initialization logic to WebGL thread. 2018-09-10 16:31:29 -04:00
Josh Matthews
15e2af0fea webgl: Support DEPTH_STENCIL_ATTACHMENT on osmesa. 2018-09-10 15:56:16 -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
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
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
Anthony Ramine
476640c3ab Use active uniforms data to implement gl.uniform* checks 2018-07-17 01:26:44 +02:00
Anthony Ramine
e7631cea61 Move ANGLE name shenanigans to WebGL thread 2018-07-16 10:16:30 +02:00
Anthony Ramine
cbac5d05be Store active uniforms on the DOM side 2018-07-16 10:16:29 +02:00
Anthony Ramine
a5b800970a Remove WebGLCommand::GetActiveAttrib 2018-07-11 11:55:50 +02:00
Anthony Ramine
4e6eea221a Implement instanced WebGL drawing calls (part of #20791) 2018-07-08 10:44:45 +02:00
Anthony Ramine
31774e9203 Implement gl.getParameter(gl.MAX_VIEWPORT_DIMS) 2018-07-08 10:14:10 +02:00
Anthony Ramine
15389586d9 Make gl.useProgram(null) do the right thing 2018-07-05 14:20:47 +02:00
Anthony Ramine
fc593c68c5 Store active attribs in DOM and optimise active attributes APIs 2018-07-05 14:20:47 +02:00
Anthony Ramine
cde6023ed4 Store vertex attribs data in DOM and optimise GetVertexAttrib 2018-07-05 14:20:47 +02:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
Anthony Ramine
f1288cc6e0 Implement EXT_texture_filter_anisotropic 2018-06-06 12:24:47 +02:00
Josh Matthews
41ced88f71 Improve debugging output for WebGL errors. 2018-05-29 17:25:03 -04:00
Anthony Ramine
3e510ec008 Implement most of the unsupported parameters in gl.getParameter()
Fixes #20536.
Fixes #20537.
Fixes #20538.
Fixes #20544.
Fixes #20545.
Fixes #20546.
Fixes #20548.
Fixes #20549.
Fixes #20551.
2018-05-24 12:32:15 +02:00
Anthony Ramine
0f91712800 Update to gleam 0.5 2018-05-05 13:08:36 +02:00
Fausto Núñez Alberro
58760d91d1
Implement WebGL GetRenderbufferParameter
This needed a bump of gleam to version 0.4.33
2018-04-24 18:16:51 +02:00
Matt McCoy
36c0e387dd Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE) 2018-04-17 20:44:35 -04:00
Anthony Ramine
fb290e9c9e Properly clamp arguments to WebGLRenderingContext.depthRange 2018-04-05 09:31:09 +02:00
Anthony Ramine
7b4d66b621 Manually clamp the argument of WebGLRenderingContext.clearDepth
Better be safe than to feed stuff to some GPU driver that wouldn't clamp it.
2018-04-05 09:30:21 +02:00
Anthony Ramine
ae286a518d Cache BUFFER_USAGE value on the DOM side 2018-04-04 15:41:27 +02:00
Anthony Ramine
ce81420bef Use ByteBuf for the canvas messages
The type Vec<u8> is super unefficient to work with in Serde if all you want
to represent is a simple blob.
2018-03-26 20:48:02 +02:00
Anthony Ramine
d6ebbd3e17 Implement gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE) 2018-03-24 16:36:19 +01:00
Glenn Watson
30bb1ccbef Update WR (accelerated webgl fix on mac, line decoration optimizations). 2018-03-23 07:58:31 +10:00
Anthony Ramine
e34b19c42c Implement gl.getParameter(gl.VIEWPORT) 2018-03-22 19:17:36 +01:00
Igor Gutorov
ee5bdbbd8b Implement WebGL getFramebufferAttachmentParameter API 2018-03-22 18:26:18 +02:00
Igor Gutorov
bdd53f35af Simplify GetShaderPrecisionFormat 2018-03-21 01:57:44 +02:00
Igor Gutorov
7e5160b79e Simplify BufferParameter 2018-03-20 21:24:10 +02:00
Igor Gutorov
0747853ad0 Simplify VertexAttribOffset 2018-03-20 21:08:28 +02:00
Igor Gutorov
431e3ddf8d Simplify GetTexParameter 2018-03-20 21:00:46 +02:00
Martina Kollarova
288ef50fb7 Add WebGL function glGetTexParameter
Set the expected result of the test `tex-input-validation.html` to CRASH, since
that is caused by unrelated problems. The test was previously not executing
completely, because it stopped when it didn't find the implementation of
getTexParameter.
2018-03-06 15:28:10 +02:00
bors-servo
c9ba16f9fb Auto merge of #19868 - CYBAI:specific-assertion, r=emilio
Use specific assertions

Similar to #19865
r? jdm

Note: Should I squash all the commits into one commit?

---
- [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 it should not break anything

<!-- 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/19868)
<!-- Reviewable:end -->
2018-01-25 18:06:33 -06:00
CYBAI
1ca913168d Use specific assertion for webgl thread 2018-01-25 23:45:16 +08:00
Glenn Watson
bd16f1a33f Update WR (new capture API, render target cache optimization) 2018-01-25 07:35:16 +10:00
Glenn Watson
800a66fc11 Update WR (minimal use of new transaction API). 2018-01-19 15:55:52 +10:00
Glenn Watson
3f2ebfa422 Update WR (removal of RGB8, which isn't supported on some hardware).
Instead, we convert any source RGB8 images into RGBx (with
an opaque alpha channel).
2018-01-08 09:02:56 +10:00
Imanol Fernandez
c22674481b Set the correct Angle GLSL output when using WebGL 2 2017-11-13 14:58:06 +01:00