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
3179ed59c5
Properly check for GL object ownership ( fixes #21133 )
2018-07-24 15:05:35 +02:00
Anthony Ramine
661e258b28
Store a reference to the WebGLRenderingContext in WebGLObject
2018-07-24 13:27:33 +02:00
Anthony Ramine
b64232d77b
Invalidate all WebGLUniformLocation values on program relink
2018-07-19 11:34:04 +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
cbac5d05be
Store active uniforms on the DOM side
2018-07-16 10:16:29 +02:00
Anthony Ramine
ef7d495838
Properly implement the checks for gl.renderbufferStorage ( fixes #20563 )
2018-07-09 15:27:51 +02:00
Anthony Ramine
4e6eea221a
Implement instanced WebGL drawing calls (part of #20791 )
2018-07-08 10:44:45 +02:00
Anthony Ramine
0aefffc5bf
Correctly implement the vertex buffer checks in drawArrays
...
This is half of #20599 . The check for drawElements is a bit more complex
to implement.
2018-07-08 10:44:45 +02:00
Anthony Ramine
f0ca100e87
Return an empty typed array from gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)
2018-07-08 10:44:42 +02:00
Anthony Ramine
31774e9203
Implement gl.getParameter(gl.MAX_VIEWPORT_DIMS)
2018-07-08 10:14:10 +02:00
Anthony Ramine
0e6bec65bb
Return typed arrays from gl.getParameter ( fixes #20655 )
2018-07-08 10:11:44 +02:00
Anthony Ramine
6996d1ce36
Fix gl.getShaderSource and gl.getShaderInfoLog
...
It only returns null if there was an error, and the only error isn't
implemented yet.
2018-07-08 10:11:44 +02:00
Anthony Ramine
0e93f06d8d
Pass more GL limits to the ANGLE shader compiler
2018-07-08 10:11:44 +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
0e2e834d18
Fix gl.linkProgram() signature
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
Anthony Ramine
0814bd6699
Rename VertexAttribs::set_from to VertexAttribs::clone_from
2018-07-05 14:20:47 +02:00
Anthony Ramine
0018e5e6ba
Refactor some vertex attrib checks
2018-07-05 14:20:47 +02:00
Anthony Ramine
f108a3e797
Introduce VertexAttribData
2018-07-05 14:20:47 +02:00
Anthony Ramine
5d43f1c9bd
Rename BoundAttribBuffers to VertexAttribs and make it store a slice
2018-07-05 14:20:44 +02:00
Anthony Ramine
02b8766e75
Implement EXT_blend_minmax
2018-06-22 14:10:56 +02:00
bors-servo
8f84f893a7
Auto merge of #21072 - servo:webgl, r=emilio
...
Implement checks for vertex attribs enabled as arrays without a bound buffer
<!-- 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/21072 )
<!-- Reviewable:end -->
2018-06-20 10:19:38 -04:00
Anthony Ramine
fc3dd7cefc
Implement checks for vertex attribs enabled as arrays without a bound buffer
2018-06-20 15:59:06 +02:00
bors-servo
1f562af418
Auto merge of #20699 - simartin:issue_20593, r=nox
...
Issue #20593 : Implement proper checks in WebGLRenderingContext's getFramebufferAttachmentParameter().
Add missing input checks.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20593
- [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/20699 )
<!-- Reviewable:end -->
2018-06-18 12:01:39 -04:00
Anthony Ramine
f1288cc6e0
Implement EXT_texture_filter_anisotropic
2018-06-06 12:24:47 +02:00
bors-servo
022daccbe1
Auto merge of #20884 - jdm:more-limits, r=avadacatavra
...
Don't forward GL parameter gets for constant limits.
This avoids IPC traffic for unchanging constants that are determined when the GL context is created. These changes require https://github.com/emilio/rust-offscreen-rendering-context/pull/123 .
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20876 .
- [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/20884 )
<!-- Reviewable:end -->
2018-05-31 15:03:43 -04:00
Josh Matthews
76c29f8bd0
Don't forward GL parameter gets for constant limits.
2018-05-31 14:24:18 -04:00
Simon Martin
08b193c922
Issue #20593 : Implement proper checks in WebGLRenderingContext's getFramebufferAttachmentParameter().
2018-05-31 20:09:11 +02:00
Josh Matthews
b1202cfa9f
Don't panic when tearing down a WebGL context and the thead is unreachable.
...
This avoids some cascading double-panics when there are errors in the WebGL rendering thread.
2018-05-29 15:26:39 -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
bors-servo
0b5720547e
Auto merge of #20669 - simartin:issue_20623, r=jdm
...
Issue #20623 : Check the input to WebGLRenderingContext's clear().
Validate the input to this function as per specifications.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20623
- [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/20669 )
<!-- Reviewable:end -->
2018-05-20 11:54:56 -04:00
Eric Anholt
471924af62
webgl: Add getParameter(UNPACK_PREMULTIPLY_ALPHA_WEBGL) support.
2018-05-07 09:46:30 -07:00
Eric Anholt
8c052d3593
webgl: Add getParameter(UNPACK_FlIP_Y_WEBGL) support.
2018-05-07 09:46:13 -07:00
Eric Anholt
5f2d512c12
webgl: Drop a silly check for 0 in GetTexParameter.
...
0 is not among the valid values for a wrap mode or filter, so it won't
ever be returned unless the driver is broken, and even if it was a
valid value we would want to pass it through.
2018-05-05 20:13:02 -07: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
Simon Martin
f32ffeb553
Issue #20623 : Check the input to WebGLRenderingContext's clear().
2018-04-21 11:32:11 +02:00
Matt McCoy
36c0e387dd
Implement gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)
2018-04-17 20:44:35 -04:00
Anthony Ramine
d16a73001f
Check the bound buffer element array only for count > 0 in gl.drawElements
...
See https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
2018-04-16 16:23:13 +02:00
Anthony Ramine
7f1590dac0
Check mode first in gl.drawElements
2018-04-16 16:23:07 +02:00
Anthony Ramine
ac85d1255d
Emit InvalidEnum for invalid targets passed to gl.renderbufferStorage
2018-04-06 11:22:27 +02:00
Anthony Ramine
183cc4c035
Properly check for invalid targets in gl.BindFramebuffer
...
It should always emit InvalidEnum, not InvalidOperation.
2018-04-06 11:22:27 +02:00
Anthony Ramine
91d07a27db
Remove SAMPLE_COVERAGE_INVERT from WebGLRenderingContext::validate_feature_enum
...
This constant is not mentioned in the docs of glEnable or glIsEnabled.
2018-04-05 09:31:13 +02:00
Anthony Ramine
1881c09a9c
Mention #20534 near the enable/disable/isEnabled WebGL methods
2018-04-05 09:31:12 +02: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
fc6335c01d
Properly allow more than FUNC_ADD in blendEquationSeparate
2018-04-04 15:49:21 +02:00