Commit Graph

347 Commits

Author SHA1 Message Date
Andrew Osmond
7579cce158 Bug 1657375 - Cache the principal hash value for OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
We cannot access ClientWebGLContext::mCanvasElement or its associated
nsIPrincipal off the main thread. We use the hash value of the principal
to limit how many WebGL contexts a single domain can create. We can
compute this when the worker is initialized for OffscreenCanvas worker
instances.

Differential Revision: https://phabricator.services.mozilla.com/D128530
2021-11-09 20:16:05 +00:00
Andrew Osmond
c530ee2184 Bug 1735874 - Fix broken resist fingerprinting with OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
OffscreenCanvas can be run on worker threads and is disabled by default.
The existing code trips asserts because we try to use the document,
which is main thread only, directly on the worker thread. This patch
caches the resist fingerprinting status for the worker when it is
created for future reference.

Differential Revision: https://phabricator.services.mozilla.com/D128510
2021-11-09 20:16:04 +00:00
Andrew Osmond
2de5a009f5 Bug 1734649 - Part 4. Lift some conditions preventing WebGL OOP. r=jgilbert
Now that WebGL runs on the Renderer thread in the compositor process
when OOP, we can now lift the threadsafe condition on Linux preventing
WebGL OOP. Regardless of webgl.out-of-process's setting, we should
always prefer by default to run worker WebGL contexts OOP to avoid
similar threadsafe conflicts in the content process.

Differential Revision: https://phabricator.services.mozilla.com/D129896
2021-11-04 16:29:45 +00:00
Andrew Osmond
fdc4cfcadc Bug 1734649 - Part 3. Switch to always allocating PWebGL instances via CanvasManager. r=jgilbert
This patch causes us to move WebGL execution in the compositor process
from the Compositor thread to the Renderer thread. This has the
advantage of keeping all of our GL calls on the same thread, which makes
us work more like a typical application. This makes the drivers happy,
especially on Linux, and may allow us to move forward with OOP WebGL on
Linux.

Differential Revision: https://phabricator.services.mozilla.com/D127903
2021-11-04 16:29:44 +00:00
Sandor Molnar
fbc82199a9 Backed out 3 changesets (bug 1736066) for causing webgl failures in gfx/2d/Logging. CLOSED TREE
Backed out changeset 99a4bb2e493b (bug 1736066)
Backed out changeset 948a1595c3d8 (bug 1736066)
Backed out changeset b371e1b31863 (bug 1736066)
2021-10-28 22:10:39 +03:00
Jeff Gilbert
9a6bee1276 Bug 1736066 - Release shader after ipc DetachShader dispatch. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D129738
2021-10-28 17:30:41 +00:00
Andrew Osmond
53bce6dc87 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-18 11:44:51 +00:00
Jeff Gilbert
fa31d7d4fc Bug 1725069 - Allow GLSL-invalid chars in shaderSource. r=gfx-reviewers,kvark
Convert u16->u8 on client.
Crush to GLSL-charset and replace non-GLSL chars with
boring-but-still-invalid '$'.

Differential Revision: https://phabricator.services.mozilla.com/D125756
2021-09-16 20:19:11 +00:00
Csoregi Natalia
9d570a2a8e Backed out changeset d3de7cb364e9 (bug 1725069) for webgl failures on test_conformance__misc__invalid-passed-params.html. CLOSED TREE 2021-09-16 06:49:27 +03:00
Jeff Gilbert
6c01dd2a3c Bug 1725069 - Allow GLSL-invalid chars in shaderSource. r=gfx-reviewers,kvark
Convert u16->u8 on client.
Crush to GLSL-charset and replace non-GLSL chars with
boring-but-still-invalid '$'.

Differential Revision: https://phabricator.services.mozilla.com/D125756
2021-09-15 22:31:24 +00:00
Jeff Gilbert
da69a4aa02 Bug 1730282 - Cleanup IPC WebGL code. r=gfx-reviewers,lsalzman
* Replace QueueStatus with bool
* Remove unused structs and code
* Add some MOZ_LIKELY to (de)serialization branches

Differential Revision: https://phabricator.services.mozilla.com/D125295
2021-09-11 02:11:11 +00:00
Marian-Vasile Laza
bb9e2f80fb Merge autoland to mozilla-central. a=merge 2021-09-04 12:38:27 +03:00
Iulian Moraru
5ec6e27b91 Backed out changeset 089962073382 (bug 1728903) for causing Bp-hybrid bustages on ImageBitmapRenderingContext.cpp. CLOSED TREE 2021-09-03 18:49:32 +03:00
Andrew Osmond
6a5f7ab2d3 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 12:52:05 +00:00
Noemi Erli
6fcdaed88b Backed out changeset f12c6a6cd1a5 (bug 1728903) for causing build bustage in TestTextures.cpp CLOSED TREE 2021-09-03 05:16:59 +03:00
Andrew Osmond
a5a30fa776 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 01:48:17 +00:00
Jeff Gilbert
9ad028e86b Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-27 01:47:14 +00:00
Matt Woodrow
f8e5adee3d Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila
1cf6d3ee11 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow
d733b6df02 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Butkovits Atila
31ec7dc564 Backed out changeset a4a346ecefd7 (bug 1726265) for causing failures at test_2_conformance2__extensions__oes-draw-buffers-indexed.html. CLOSED TREE 2021-08-21 01:46:52 +03:00
Jeff Gilbert
7c2c091f23 Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 20:59:54 +00:00
Cosmin Sabou
8af18a2680 Backed out changeset 24e0d3aa4ada (bug 1726265) for causing non-unified build bustage. CLOSED TREE 2021-08-20 04:29:04 +03:00
Jeff Gilbert
b77fc4847f Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 00:05:06 +00:00
Jeff Gilbert
86789820df Bug 1527181 - Add webgl.auto-flush:true. r=lsalzman
* webgl.auto-flush (default: true) enqueues a runnable to flush pending
  webgl commands after each draw.
* webgl.auto-flush.gl (default: false) causes this auto-flush to also
  call glFlush.

This is probably not useful for pure RAF-based apps, since they run
RAF();Present(); back-to-back. For other cases though, this should
improve latency and may reduce jank.

Differential Revision: https://phabricator.services.mozilla.com/D123031
2021-08-19 21:22:04 +00:00
Jeff Gilbert
fc619db9ed Bug 1720965 - Use Maybe<Shmem> to avoid Writing an (invalid) blank shmem. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D120125
2021-08-06 22:02:40 +00:00
Marian-Vasile Laza
083750f34f Backed out 2 changesets (bug 1720965) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 2ed56ddce45a (bug 1720965)
Backed out changeset 3531708ab54e (bug 1720965)
2021-08-04 03:14:29 +03:00
Jeff Gilbert
179672503e Bug 1720965 - Use Maybe<Shmem> to avoid Writing an (invalid) blank shmem. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D120125
2021-08-03 20:06:55 +00:00
Jeff Gilbert
5511ff7ef5 Bug 1722113 - Expose sanitized UNMASKED_RENDERER as RENDERER. r=lsalzman,tjr
Add prefs:
* webgl.enable-renderer-query: true
* webgl.sanitize-unmasked-renderer: false
Rename prefs:
* webgl.renderer-string-override => webgl.override-unmasked-renderer
* webgl.vendor-string-override => webgl.override-unmasked-vendor

webgl.enable-renderer-query is treated as false if RFP is enabled.
webgl.override-unmasked-renderer overrides UNMASKED_RENDERER and
is then sanitized for RENDERER if enabled.

Differential Revision: https://phabricator.services.mozilla.com/D120775
2021-07-27 01:18:29 +00:00
Tooru Fujisawa
0986662ce6 Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Jeff Gilbert
b8764fb04d Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-14 21:27:08 +00:00
Butkovits Atila
45678d5d97 Backed out changeset 45887183c584 (bug 1715690) for causing failures at SanitizeRenderer. CLOSED TREE 2021-06-12 04:12:18 +03:00
Jeff Gilbert
65b37f7f09 Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-11 23:54:39 +00:00
Iulian Moraru
e38919bd9b Backed out changeset 67b696ec70a9 (bug 1715690) for causing build bustages on SanitizeRenderer.cpp. CLOSED TREE 2021-06-11 02:46:23 +03:00
Jeff Gilbert
a4496cbc13 Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman
+ Minor reduction in unused flexibility of limits.

Differential Revision: https://phabricator.services.mozilla.com/D117385
2021-06-10 22:55:50 +00:00
Jeff Gilbert
7510580777 Bug 1655000 - Use same function for getting size as reading into buffer. r=lsalzman
Previously we called GetFrontBufferSize, alloc'd a buffer, and called
FrontBufferSnapshotInto to read into the buffer.
Now, call FrontBufferSnapshotInto({}) to get size, and then alloc and
pass pointer to newly alloc'd data into
FrontBufferSnapshotInto(Some(ptr)).
Using the same function for both means that logic can't diverge and
cause mismatch bugs.

Differential Revision: https://phabricator.services.mozilla.com/D113611
2021-05-06 00:22:42 +00:00
Alexandru Michis
e455810ac6 Backed out changeset 1331f134a250 (bug 1655000) for causing bustages in WebGLContext.cpp
CLOSED TREE
2021-04-29 00:44:19 +03:00
Jeff Gilbert
db38e2c290 Bug 1655000 - Use same function for getting size as reading into buffer. r=lsalzman
Previously we called GetFrontBufferSize, alloc'd a buffer, and called
FrontBufferSnapshotInto to read into the buffer.
Now, call FrontBufferSnapshotInto({}) to get size, and then alloc and
pass pointer to newly alloc'd data into
FrontBufferSnapshotInto(Some(ptr)).
Using the same function for both means that logic can't diverge and
cause mismatch bugs.

Differential Revision: https://phabricator.services.mozilla.com/D113611
2021-04-28 20:38:23 +00:00
Snehaa2296
bb57a16c0e Bug 1629420 - ClientWebGLContext.cpp: the 'empty' method should be used to check for emptiness instead of 'size'. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D109271
2021-03-22 14:28:05 +00:00
Henri Sivonen
b6dc8371f9 Bug 1693534 - Avoid leaking the kernel version to the Web with amdgpu. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D105636
2021-02-22 09:18:19 +00:00
Sylvestre Ledru
0a33533196 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D105158
2021-02-15 08:49:20 +00:00
Jeff Gilbert
5cc460c364 Bug 1691606 - Clean up dead code following WebGL out-of-process stabilization. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D104495
2021-02-09 07:57:03 +00:00
Sylvestre Ledru
ddcb9eb4bc Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D102084
2021-01-18 16:50:16 +00:00
Jeff Gilbert
a315d0bc8f Bug 1640607 - Send SurfaceDescriptors for GPU blitting for video-to-webgl. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D101061
2021-01-14 01:23:06 +00:00
Mihai Alexandru Michis
66ca1a0d98 Backed out changeset 6149f5b15c5e (bug 1640607) for causing bustages in WebGLTextureUpload.cpp
CLOSED TREE
2021-01-14 00:43:40 +02:00
Steve Fink
a1d96801f9 Bug 1684122 - Demarcate region where GC would break stuff r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100427
2021-01-13 22:24:36 +00:00
Jeff Gilbert
d26398df9f Bug 1640607 - Send SurfaceDescriptors for GPU blitting for video-to-webgl. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D101061
2021-01-13 21:49:40 +00:00
Jeff Gilbert
e95c696588 Bug 1680595 - Point users towards "webgl.disable-fail-if-major-performance-caveat" if failIfMajorPerformanceCaveat: true causes failure. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98824
2020-12-07 05:35:57 +00:00
Jeff Gilbert
98ce99a9a7 Bug 1638568 - E.g. uniform1i(null, ...) should check avail len not total len. r=lsalzman
Also:
* Propagate null-location UniformDatas to host
* Move transpose validation to host-side

Differential Revision: https://phabricator.services.mozilla.com/D98243
2020-11-30 22:00:23 +00:00
Simon Giesecke
46908cfb51 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00